题目链接:http://poj.org/problem?id=3268
题目大意:给你N个农场,在X农场要举办一个party,其它农场需要到X农场去,然后还要回来,问N个农场中距离最远的那个至少为多少?,给出的边为单向边。。。
思路:用dijkstra最初X农场到其它几个农场的最短距离,然后在把边反向,继续求出X到其它几个农场的最短距离,算出最大的那一个。。。
code:
#inc...
分类:
其他好文 时间:
2014-09-26 00:17:08
阅读次数:
241
Description
Gappu has a very busy weekend ahead of him. Because, next weekend is Halloween, and he is planning to attend as many parties as he can. Since it's Halloween, these
parties are all cos...
分类:
其他好文 时间:
2014-09-19 12:05:05
阅读次数:
183
Description
You want to hold a party. Here's a polygon-shaped cake on the table. You'd like to cut the cake into several triangle-shaped parts for the invited comers. You have a knife to cut. The t...
分类:
其他好文 时间:
2014-09-18 23:48:44
阅读次数:
314
AGDI DriversAGDI is an Application Program Interface (API) third-party developers can use to create hardware debugger drivers that interface directly ...
分类:
其他好文 时间:
2014-09-18 16:14:34
阅读次数:
2187
Problem: Assembly generation failed -- Referenced assembly '' does not have a strong nameCause: this is due to you have referenced a third-party dll w...
分类:
其他好文 时间:
2014-09-18 16:05:34
阅读次数:
264
http://poj.org/problem?id=3083DescriptionThe cornfield maze is a popular Halloween treat. Visitors are shown the entrance and must wander through the ...
分类:
其他好文 时间:
2014-09-18 13:17:13
阅读次数:
228
题目链接
题意:n个人坐成环形,相邻的两个可以交换位置,求最少交换次数使得序列相反。
思路:类似与冒泡排序,可以将环形序列拆成两个序列,分别进行冒泡。当n为奇数时,分为n/2与n/2 + 1,所以ans = (n / 2) * (n / 2 - 1) / 2 + (n / 2) * (n / 2 + 1) / 2,当n为偶数时,分为两个n/2, 所以ans = (n / 2...
分类:
其他好文 时间:
2014-09-15 19:30:19
阅读次数:
134
在查看了ubuntu的debian rules,重新配置chromium
GYP_GENERATORS=make GYP_DEFINES="disable_sse2=1 use_third_party_translations=1 werror= sysroot= disable_nacl=1 linux_use_gold_binary=0 linux_use_gold_flags=0 enab...
分类:
其他好文 时间:
2014-09-15 14:23:38
阅读次数:
231
二分+2-Sat判断是否可行输出字典序最小的解输出字典序可行解其实这些都是小问题,最重要的是建图,请看论文。特殊的建边方式,如果a b是一对,a必须选,那么就是b->a建边。HDU 3062 Party模板题#include #include #include #include #include u...
分类:
其他好文 时间:
2014-09-12 11:45:33
阅读次数:
169
题意:一些牛要去某一点參加聚会,然后再回到自己家,路是单向的,问花费时间最多的那头牛最少须要花费多长时间。思路:从聚会地点返回,相当于是从某一点到其它各个点的最短路径。从牛的家中走到聚会地点,能够把路径反过来变成从聚会地点到各个点的最短路径,两个最短路径值加起来就是每头牛所花费的最小时间,找出最大的...
分类:
其他好文 时间:
2014-09-10 19:11:50
阅读次数:
191