I am going to my home. There are many cities and many bi-directional roads between them. The cities are numbered from 0 to n-1 and each road has a cos ...
分类:
编程语言 时间:
2016-06-06 20:40:16
阅读次数:
351
Description There are N cities, and M directed roads connecting them. Now you want to transport K units ofgoods from city 1 to city N. There are many ...
分类:
其他好文 时间:
2016-05-23 14:35:09
阅读次数:
237
题目链接:点击打开链接
思路:首先,我们要知道一个贪心结论:敌人如果有k个炸弹, 那么他一定是炸连续的k个点, 这样会使得炸的面积最大。 那么我们只要二分炸弹数mid,每隔mid个点重新建立一个平面, 仍然是n个平面, 代表n种可能情况, 那么如果他们的交存在, 那么司令部只要放在这个平面交的面积内就行了。 所以问题迎刃而解, 二分答案, 用半平面交判断答案是否可行。
细节参见代码:
#...
分类:
其他好文 时间:
2016-05-22 12:31:24
阅读次数:
165
题目信息1087. All Roads Lead to Rome (30)时间限制200 ms
内存限制65536 kB
代码长度限制16000 B
Indeed there are many different tourist routes from our city to Rome. You are supposed to find your clients the route with...
分类:
其他好文 时间:
2016-05-18 19:32:53
阅读次数:
186
【PAT】Emergency(最短路条数-SPFA)
As an emergency rescue team leader of a city, you are given a special map of your country. The map shows several scattered cities connected by some roads. Amount of res...
分类:
其他好文 时间:
2016-05-13 04:29:41
阅读次数:
415
A - Jungle Roads
Time Limit:1000MS Memory Limit:10000KB 64bit IO Format:%I64d & %I64u
Submit Status
Description
The Head Elder of the tropical island of Lagrishan has a pro...
分类:
其他好文 时间:
2016-05-13 00:21:21
阅读次数:
143
DescriptionAngel was caught by the MOLIGPY! He was put in prison by Moligpy. The prison is described as a N * M (N, M <= 200) matrix. There are WALLs, ROADs, and GUARDs in the prison.Angel’s friends wa...
分类:
编程语言 时间:
2016-05-12 20:29:27
阅读次数:
287
这种问题先对区间和线段进行排序,排序方法见代码cmp
然后分析其中一个点,用sum求值
poj 3067
Description
Japan plans to welcome the ACM ICPC World Finals and a lot of roads must be built for the venue. Japan is tal...
分类:
编程语言 时间:
2016-05-12 18:46:21
阅读次数:
263
As an emergency rescue team leader of a city, you are given a special map of your country. The map shows several scattered cities connected by some roads. Amount of rescue teams in each city and the le...
分类:
其他好文 时间:
2016-05-12 18:31:00
阅读次数:
139
Constructing Roads
Time Limit: 2000/1000 MS (Java/Others) Memory Limit: 65536/32768 K (Java/Others)
Total Submission(s): 19673 Accepted Submission(s): 7510
Problem Description
There are N vi...
分类:
其他好文 时间:
2016-05-12 16:38:52
阅读次数:
214