Time Limit:1000MSMemory Limit:65536KTotal Submissions:24383Accepted:11243DescriptionThe island nation of Flatopia is perfectly flat. Unfortunately, Fl...
分类:
编程语言 时间:
2015-07-17 11:40:02
阅读次数:
142
DescriptionThe island nation of Flatopia is perfectly flat. Unfortunately, Flatopia has no public highways. So the traffic is difficult in Flatopia. T...
分类:
其他好文 时间:
2015-07-08 14:13:28
阅读次数:
113
什么?你说你看不懂英文题面?
好吧其实我也看不懂…
把论文里题面翻译放在英文题面下面
HIGH - Highways
no tags In some countries building highways takes a lot of time… Maybe that’s because there are many possiblities to construct a network o...
分类:
其他好文 时间:
2015-06-09 21:59:43
阅读次数:
272
题目描述
With highways available, driving a car from Hangzhou to any other city is easy. But since the tank capacity of a car is limited, we have to find gas stations on the way from time to time. Diff...
分类:
其他好文 时间:
2015-06-06 10:38:53
阅读次数:
151
题目链接: http://poj.org/problem?id=1751题目大意: 给出n个点,每个点用二维坐标表示,不会用任意两个点在同一位置,在这n个点之间已经有m条道路了,问在花费最少的情况下修建那几条路能把所有的点连在一起?解题思路: 对任意一个点向其他的点建边,因为建图的时候,边比较...
分类:
其他好文 时间:
2015-06-02 21:32:39
阅读次数:
104
题目如下:
It is vitally important to have all the cities connected by highways in a war. If a city is occupied by the enemy, all the highways from/toward that city are closed. We must know immediat...
分类:
其他好文 时间:
2015-05-23 11:33:36
阅读次数:
167
求最小生成树的长度最小的边,我用的是prim算法: 1 #include 2 #include 3 #include 4 using namespace std; 5 6 const int INF=0x3f3f3f3f; 7 int map[505][505]; 8 int visit[5...
分类:
其他好文 时间:
2015-05-15 21:13:17
阅读次数:
91
问题的方向是对称的,统计\*2即可,当gcd(a,b)>1及重复,
证:a*b满足gcd(a,b)>1,在他对角线和a'和b'对角线是同一条直线(a'=a/gcd(a,b)b'=b/gcd(a,b))
其次,如果放置位置不够靠左,也不够靠上,则它和它“左上方”的包围盒也重复了
假定左上角坐标(0,0)则对于左上角在(x,y)的包围盒,其左上方的包围盒的左上角为(x-a,y-b),这个左上角合...
分类:
其他好文 时间:
2015-05-12 15:54:53
阅读次数:
124
Fire
Time Limit: 2000MS Memory Limit: 65536K
Total Submissions: 1161 Accepted: 595
DescriptionCountry Z has N cities, which are numbered from 1 to N. Cities are connected by highways, and t...
分类:
其他好文 时间:
2015-04-25 18:25:04
阅读次数:
233