图论
RugerMc
寄蜉蝣于天地,渺沧海之一粟
展开
-
POJ 2387 Til the Cows Come Home(Dijkstra算法)
DescriptionBessie 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 her beauty sleep, so she want原创 2017-05-10 21:08:10 · 283 阅读 · 0 评论 -
HDU 3259 Wormholes(Bellman-Ford算法)
DescriptionWhile 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 t原创 2017-05-21 19:54:59 · 505 阅读 · 2 评论 -
Hrbust 1802 游骑兵出动(Dijkstra算法)
Description吉姆雷诺的游骑兵们想要摧毁蒙斯克帝国的一个要塞,但是游骑兵们需要找到一条最快的路径来抵达要塞并摧毁。这样的突袭是蒙斯克绝对想不到的。现在游骑兵找来了一张地图,地图上标出了所有可以通行的路,游骑兵标出了每条路的长度和这条路上允许的最快速度。已知每单位距离消耗的油是一定的,吉姆雷诺想知道如果选择最快的路径到达要塞需要准备多少石油。游骑兵们的出发地点是一个叫carle的地方,要塞所在原创 2017-05-22 21:17:47 · 354 阅读 · 0 评论 -
Hrbust 2307 Find your teacher(Floyed算法 | 传递闭包)
**Description** You just finished your exam, you felt terrible because you might fail the exam. But your teacher was so kind that he might let you pass the lesson if you called him and begged for pass原创 2017-05-10 20:38:20 · 429 阅读 · 0 评论 -
Hrbust 1123 MST(最小生成树,Kruskal算法|Prim算法)
首先我们需要什么是最小生成树举个例子: 假如有10个村庄,你需要走遍这10个村庄,不漏掉任何一个村庄,如何走最省力(路程最短),就是最小生成树了。Description既然大家都不愿意做水题,元帅也很无奈,想了好久也不知道什么是水题,因为在元帅的眼里都是水题,他定义的非水题就是他做不出来的题。太囧了,随便弄个水的MST。Input测试输入包含若干测试用例。每个测试用例的第1行给出顶点数目N ( <原创 2017-06-02 21:01:18 · 432 阅读 · 0 评论 -
POJ1273 Drainage Ditches 【网络流 最大流/最小割 EK/Dimic 】
rainage DitchesTime Limit: 1000MS Memory Limit: 10000KTotal Submissions: 82312 Accepted: 31968DescriptionEvery time it rains on Farmer John's fields, a pond forms over Bessie's favorite clover patch. ...原创 2018-04-06 20:25:30 · 226 阅读 · 0 评论