每一户人家水的来源有两种打井和从别家接水,每户人家都可能向外输送水。 打井和接水两种的付出代价都接边。设一个超级源点,每家每户打井的代价就是从该点(0)到该户人家(1~n)的边的权值。接水有两种可能,从高处接水,那么代价是哈密顿距离与Y的乘积(可以认为就是水管的费用);从低处接水,还要加上付出...
分类:
其他好文 时间:
2014-08-28 21:05:46
阅读次数:
396
Description
Alice and Bob are very smart guys and they like to play all kinds of games in their spare time. the most amazing thing is that they always find the best strategy, and that's why they fe...
分类:
其他好文 时间:
2014-08-28 16:55:48
阅读次数:
303
题目链接http://acm.hdu.edu.cn/showproblem.php?pid=1598题目思路:对于这个题目,可以先按速度的大小成小到大排序,再成0 到 m ,把所有可以联通的道路全部暴搜一遍,一但联通,两者的min=两者的速度差,依次成0 到 找 m 找,如果找到更最小的就取代min...
分类:
其他好文 时间:
2014-08-28 14:42:29
阅读次数:
253
Bean bags for many years. Although it is an old design, people feel like it, and still one of the most sought after tools today. If you are looking fo...
分类:
其他好文 时间:
2014-08-28 13:01:39
阅读次数:
263
RSA
Time Limit: 2000/1000 MS (Java/Others) Memory Limit: 65536/32768 K (Java/Others)
Total Submission(s): 1415 Accepted Submission(s): 1017
Problem Description
RSA is one of the most...
分类:
其他好文 时间:
2014-08-28 09:44:19
阅读次数:
191
For the most part, a lot of what we know about software development can be applied to different environments and technologies. But, there are always s...
分类:
其他好文 时间:
2014-08-27 23:20:28
阅读次数:
223
题目链接Devendra loves the XOR operation very much which is denoted by∧sign in most of the programming languages. He has a listAofNnumbers and he wants to...
分类:
其他好文 时间:
2014-08-27 21:53:08
阅读次数:
316
http://acm.hdu.edu.cn/showproblem.php?pid=1712Problem DescriptionACboy has N courses this term, and he plans to spend at most M days on study.Of cours...
分类:
其他好文 时间:
2014-08-27 21:40:58
阅读次数:
287
每一行都建一个线段树。。。。
Fast Matrix Operations
There is a matrix containing at most 106 elements divided into r rows and c columns. Each element has a
location (x,y) where 1
1 x1 y1 x2 y2 v
...
分类:
其他好文 时间:
2014-08-27 18:50:58
阅读次数:
199
题目链接:http://acm.hdu.edu.cn/showproblem.php?pid=1598find the most comfortable roadTime Limit: 1000/1000 MS (Java/Others)Memory Limit: 32768/32768 K (Ja...
分类:
其他好文 时间:
2014-08-27 14:19:47
阅读次数:
164