
SPFA
文章平均质量分 86
J_Sure
唯苦修深思方能顿悟
展开
专栏收录文章
- 默认排序
- 最新发布
- 最早发布
- 最多阅读
- 最少阅读
-
HDU-2377 Bus Pass
Bus Pass Time Limit: 10000/5000 MS (Java/Others) Memory Limit: 32768/32768 K (Java/Others) Problem Description You travel a lot by bus and the costs of all the seperate tickets are starting原创 2014-08-02 14:34:42 · 1742 阅读 · 0 评论 -
【数塔DP|最长路】HDU-1224 Free DIY Tour
Free DIY Tour Time Limit: 2000/1000 MS (Java/Others) Memory Limit: 65536/32768 K (Java/Others) Problem Description Weiwei is a software engineer of ShiningSoft. He has just excellently ful原创 2014-11-26 16:18:16 · 711 阅读 · 0 评论 -
【最大费用最大流】POJ-3422 Kaka's Matrix Travels
Kaka's Matrix Travels Time Limit: 1000MS Memory Limit: 65536K Description On an N × N chessboard with a non-negative number in each grid, Kaka starts his matrix t原创 2014-10-18 20:31:01 · 1142 阅读 · 0 评论 -
ZOJ-1857(POJ-2607) Fire Station
Fire Station Time Limit: 2 Seconds Memory Limit: 65536 KB A 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 · 1166 阅读 · 0 评论 -
ZOJ-3088 Easter Holidays
Easter Holidays Time Limit: 1 Second Memory Limit: 32768 KB Special Judge Scandinavians often make vacation during the Easter holidays in the largest ski resort Are. Are provides fanta原创 2014-08-15 15:11:59 · 1001 阅读 · 0 评论 -
POJ-3259 Wormholes
Wormholes Time Limit: 2000MS Memory Limit: 65536K Description While exploring his many farms, Farmer John has discovered a number of amazing wormholes. A wormhole is very pecu原创 2014-08-13 22:31:34 · 738 阅读 · 0 评论 -
POJ-1860 Currency Exchange
Currency Exchange Time Limit: 1000MS Memory Limit: 30000K Total Submissions: 20025 Accepted: 7175 Description Several currency exchange points are working in our city.原创 2014-08-14 00:31:30 · 922 阅读 · 0 评论 -
POJ-2240 Arbitrage
Arbitrage Time Limit: 1000MS Memory Limit: 65536K Description Arbitrage 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 · 1085 阅读 · 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 · 843 阅读 · 0 评论 -
POJ-3268 Silver Cow Party
Silver Cow Party Time Limit: 2000MS Memory Limit: 65536K Total Submissions: 12731 Accepted: 5684 Description One cow from each of N farms (1 ≤ N ≤ 1000) conveniently原创 2014-08-13 20:54:55 · 916 阅读 · 0 评论 -
POJ-1613 Cave Raider
Cave Raider Time Limit: 1000MS Memory Limit: 10000K Description Afkiyia is a big mountain. Inside the mountain, there are many caves. These caves are connected by tunnels. Hidde原创 2014-08-13 16:32:47 · 1022 阅读 · 0 评论 -
ZOJ-3103 Cliff Climbing
Cliff Climbing Time Limit: 10 Seconds Memory Limit: 32768 KB At 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 · 1047 阅读 · 0 评论 -
POJ-1511 Invitation Cards
Invitation Cards Time Limit: 8000MS Memory Limit: 262144K Description In the age of television, not many people attend theater performances. Antique Comedians of Malidinesia are原创 2014-08-12 02:08:56 · 1052 阅读 · 0 评论 -
【连通图|强连通分量+最长路】POJ-3592 Instantaneous Transference
给出一个有向图,其中每个点向自己下面的和右边的那个点有边相连。'*'号的点可以进行瞬间转移(可以选择转移或者不转移),每个点有点权且不为负。'#'号的点是不能到达的点。每到一个点获得它的权值且仅一次,求出能获得的最大点权和。原创 2015-03-12 21:55:33 · 1969 阅读 · 0 评论