最短路
文章平均质量分 82
wybooooooooo
博客已正式搬迁至博客园 https://home.cnblogs.com/u/wyboooo/ 欢迎大家访问
展开
-
POJ2387-Till the cows come home【最短路】
A - Til the Cows Come Home POJ - 2387 Bessie is out in the field and wants to get back to the barn to get as much sleep as possible before Farmer John wakes her for the morning milking. Bessie needs h...原创 2018-03-15 17:58:07 · 236 阅读 · 0 评论 -
poj3259 Wormholes【最短路-bellman-负环】
While exploring his many farms, Farmer John has discovered a number of amazing wormholes. A wormhole is very peculiar because it is a one-way path that delivers you to its destination at a time that i原创 2018-03-19 22:01:25 · 121 阅读 · 0 评论 -
POJ3660 Cow Contest【最短路-floyd】
N (1 ≤ N ≤ 100) cows, conveniently numbered 1..N, are participating in a programming contest. As we all know, some cows code better than others. Each cow has a certain constant skill rating that is un原创 2018-03-19 20:45:54 · 145 阅读 · 0 评论 -
POJ3150 Candies【差分约束】
During the kindergarten days, flymouse was the monitor of his class. Occasionally the head-teacher brought the kids of flymouse’s class a large bag of candies and had flymouse distribute them. All the原创 2018-03-22 20:20:09 · 183 阅读 · 0 评论 -
POJ1860 Currency Exchange【最短路-判断环】
Several currency exchange points are working in our city. Let us suppose that each point specializes in two particular currencies and performs exchange operations only with these currencies. There can原创 2018-03-18 20:43:13 · 237 阅读 · 0 评论 -
POJ3268 Silver Cow Party【最短路】
One cow from each of N farms (1 ≤ N ≤ 1000) conveniently numbered 1..N is going to attend the big cow party to be held at farm #X (1 ≤ X ≤ N). A total of M (1 ≤ M≤ 100,000) unidirectional (one-way r原创 2018-03-18 19:37:16 · 153 阅读 · 0 评论 -
POJ1797 Heavy Transpotation
Background Hugo Heavy is happy. After the breakdown of the Cargolifter project he can now expand business. But he needs a clever man who tells him whether there really is a way from the place his cu原创 2018-03-15 21:32:27 · 139 阅读 · 0 评论 -
最短路大汇总
松弛操作:当dis[i] > dis[j] + g[j][i]时 dis[i] = dis[j] + g[j][i]dijkstra 单源最短路 O(n^2)本质是贪心 不能处理负边分成两个集合 用vis标记 一个是已经找到最短路的一个是没有找到最短路的从已经找到最短路里的点出发,进行松弛操作 找到其中最小的加入最短路的集合中 再从这个点接下去更新,做n-1次所有的距离初始化为inf#inc...原创 2018-03-15 20:10:28 · 203 阅读 · 0 评论 -
hdu6386 Age of Moyu【最短路】
Age of Moyu Time Limit: 5000/2500 MS (Java/Others) Memory Limit: 262144/262144 K (Java/Others) Total Submission(s): 3125 Accepted Submission(s): 981 Problem Description Mr.Quin love fishes ...原创 2018-08-19 17:09:07 · 154 阅读 · 0 评论