
SPFA
文章平均质量分 86
J_Sure
唯苦修深思方能顿悟
展开
-
HDU-2377 Bus Pass
Bus PassTime Limit: 10000/5000 MS (Java/Others) Memory Limit: 32768/32768 K (Java/Others)Problem DescriptionYou travel a lot by bus and the costs of all the seperate tickets are starting原创 2014-08-02 14:34:42 · 1722 阅读 · 0 评论 -
【数塔DP|最长路】HDU-1224 Free DIY Tour
Free DIY TourTime Limit: 2000/1000 MS (Java/Others) Memory Limit: 65536/32768 K (Java/Others)Problem DescriptionWeiwei is a software engineer of ShiningSoft. He has just excellently ful原创 2014-11-26 16:18:16 · 699 阅读 · 0 评论 -
【最大费用最大流】POJ-3422 Kaka's Matrix Travels
Kaka's Matrix TravelsTime Limit: 1000MS Memory Limit: 65536K DescriptionOn an N × N chessboard with a non-negative number in each grid, Kaka starts his matrix t原创 2014-10-18 20:31:01 · 1127 阅读 · 0 评论 -
ZOJ-1857(POJ-2607) Fire Station
Fire StationTime Limit: 2 Seconds Memory Limit: 65536 KBA city is served by a number of fire stations. Some residents have complained that the distance from their houses to the nearest st原创 2014-08-16 16:35:15 · 1148 阅读 · 0 评论 -
ZOJ-3088 Easter Holidays
Easter HolidaysTime Limit: 1 Second Memory Limit: 32768 KB Special JudgeScandinavians often make vacation during the Easter holidays in the largest ski resort Are. Are provides fanta原创 2014-08-15 15:11:59 · 977 阅读 · 0 评论 -
POJ-3259 Wormholes
WormholesTime Limit: 2000MS Memory Limit: 65536KDescriptionWhile exploring his many farms, Farmer John has discovered a number of amazing wormholes. A wormhole is very pecu原创 2014-08-13 22:31:34 · 722 阅读 · 0 评论 -
POJ-1860 Currency Exchange
Currency ExchangeTime Limit: 1000MS Memory Limit: 30000KTotal Submissions: 20025 Accepted: 7175DescriptionSeveral currency exchange points are working in our city.原创 2014-08-14 00:31:30 · 912 阅读 · 0 评论 -
POJ-2240 Arbitrage
ArbitrageTime Limit: 1000MS Memory Limit: 65536KDescriptionArbitrage is the use of discrepancies in currency exchange rates to transform one unit of a currency into more than原创 2014-08-12 14:21:39 · 1069 阅读 · 0 评论 -
SPFA模板
int inq[N], n, m, tot, hh[N], dis[N];struct node{ int u, v, w, next;} edge[2*M];void init(){ memset(hh, -1, sizeof(hh)); tot = 0;}void add(int u, int v, int w){原创 2014-08-02 14:50:21 · 830 阅读 · 0 评论 -
POJ-3268 Silver Cow Party
Silver Cow PartyTime Limit: 2000MS Memory Limit: 65536KTotal Submissions: 12731 Accepted: 5684DescriptionOne cow from each of N farms (1 ≤ N ≤ 1000) conveniently原创 2014-08-13 20:54:55 · 906 阅读 · 0 评论 -
POJ-1613 Cave Raider
Cave RaiderTime Limit: 1000MS Memory Limit: 10000KDescriptionAfkiyia is a big mountain. Inside the mountain, there are many caves. These caves are connected by tunnels. Hidde原创 2014-08-13 16:32:47 · 1005 阅读 · 0 评论 -
ZOJ-3103 Cliff Climbing
Cliff ClimbingTime Limit: 10 Seconds Memory Limit: 32768 KBAt 17:00, special agent Jack starts to escape from the enemy camp. There is a cliff in between the camp and the nearest safety原创 2014-09-09 09:32:15 · 1027 阅读 · 0 评论 -
POJ-1511 Invitation Cards
Invitation CardsTime Limit: 8000MS Memory Limit: 262144KDescriptionIn the age of television, not many people attend theater performances. Antique Comedians of Malidinesia are原创 2014-08-12 02:08:56 · 1034 阅读 · 0 评论 -
【连通图|强连通分量+最长路】POJ-3592 Instantaneous Transference
给出一个有向图,其中每个点向自己下面的和右边的那个点有边相连。'*'号的点可以进行瞬间转移(可以选择转移或者不转移),每个点有点权且不为负。'#'号的点是不能到达的点。每到一个点获得它的权值且仅一次,求出能获得的最大点权和。原创 2015-03-12 21:55:33 · 1954 阅读 · 0 评论