City Park 题目连接: http://acm.hust.edu.cn/vjudge/contest/view.action?cid=122283#problem/F Description Porto is blessed with a beautiful city park. The park, in the western section of the city, borders the Atlantic Ocean. It has great lawns, small forest…
F - Palindrometer Time Limit:3000MS Memory Limit:0KB 64bit IO Format:%lld & %llu Submit Status Practice UVALive 4868 Description While driving the other day, John looked down at his odometer, and it read 100000. John was pretty excited about…
City Park Problem's Link: http://acm.hust.edu.cn/vjudge/problem/viewProblem.action?id=129725 Mean: 在网格中给你一些矩形,求最大连通块的面积. analyse: 由于题目保证了矩形不会相交,所以不用扫描线也可做. 先把所有的线段分为横向和纵向,然后排序,依次判断是否相邻,相邻就用并查集合并,最后再用并查集统计一下面积,取最大值即可. Time complexity: O(N) Source code…
City Planning Time Limit: 2000/1000 MS (Java/Others) Memory Limit: 32768/32768 K (Java/Others) Total Submission(s): 503 Accepted Submission(s): 213 Problem Description After many years, the buildings in HDU has become very old. It need to rebui…
题意:给一个的格子图,有 n 行单元格,每行有a[i]个格子,要求往格子中填1~m的数字,要求每个数字大于等于左边的数字,大于上边的数字,问有多少种填充方法. 析:感觉像个DP,但是不会啊...就想暴力试试,反正数据量看起来不大才7,但是...TLE了,又换了一个暴力方法,2秒多过了,差点啊. 其实这是一个状压DP,dp[i][s]表示在第 i 列,在集合 s 中有方法数,那么怎么转移呢,这个还是挺简单的,就是判断第i+1列是不是比第 i 列都大于等于就ok了, 输入时先把行,转化成列,再计算,…
The E-pang Palace Time Limit: 20 Sec Memory Limit: 256 MB 题目连接 http://acm.hust.edu.cn/vjudge/problem/visitOriginUrl.action?id=217902 Description E-pang Palace was built in Qin dynasty by Emperor Qin Shihuang in Xianyang, Shanxi Province. Itwas the la…
C - Another Brick in the Wall Time Limit:3000MS Memory Limit:0KB 64bit IO Format:%lld & %llu Submit Status Practice UVALive 4425 Description After years as a brick-layer, you've been called upon to analyze the instability of brick walls. The…
A - String LD Time Limit:3000MS Memory Limit:0KB 64bit IO Format:%lld & %llu Submit Status Practice UVALive 4423 Description Stringld(left delete) is a function that gets a string and deletes its leftmost character (for instance Stringld(``ac…
ICPC (Isles of Coral Park City) consist of several beautiful islands. The citizens requested construction of bridges between islands to resolve inconveniences of using boats between islands, and they demand that all the islands should be reachable fr…
B - Bing it Time Limit:3000MS Memory Limit:0KB 64bit IO Format:%lld & %llu Submit Status Practice UVALive 4764 Description I guess most of you played cards on the trip to Harbin, but I'm sure you have never played the following card game. Thi…
#1094 : Lost in the City 时间限制:10000ms 单点时限:1000ms 内存限制:256MB 描述 Little Hi gets lost in the city. He does not know where he is. He does not know which direction is north. Fortunately, Little Hi has a map of the city. The map can be considered as a gri…