图论
一种坚持__
这个作者很懒,什么都没留下…
展开
-
HDU 最短路径问题(Dijkstra或Bellman)
C - 最短路径问题 Time Limit:1000MS Memory Limit:32768KB 64bit IO Format:%I64d & %I64u Submit Status Description 给你n个点,m条无向边,每条边都有长度d和花费p,给你起点s终点t,要求输出起点到终点的最短距离及其花费,如果最短距离有多条路线,则输出花费原创 2014-08-01 20:00:44 · 526 阅读 · 0 评论 -
POJ 1094 Sorting It All Out(拓扑排序)
Sorting It All Out Time Limit: 1000MS Memory Limit: 10000K Total Submissions: 30159 Accepted: 10430 Description An ascending sorted sequence of distinct values is one原创 2015-08-10 16:56:59 · 239 阅读 · 0 评论 -
POJ 2337 Catenyms(有向图欧拉路径判定&&打印)
Catenyms Time Limit: 1000MS Memory Limit: 65536K Total Submissions: 9905 Accepted: 2588 Description A catenym is a pair of words separated by a period such that the l原创 2015-01-30 20:40:04 · 687 阅读 · 0 评论 -
POJ 1386 Play on Words(有向图欧拉路径并查集判定)
Play on Words Time Limit: 1000MS Memory Limit: 10000K Total Submissions: 10068 Accepted: 3452 Description Some of the secret doors contain a very interesting word puz原创 2015-01-29 14:24:48 · 571 阅读 · 0 评论 -
POJ 2230 Watchcow(欧拉回路)
Watchcow Time Limit: 3000MS Memory Limit: 65536K Total Submissions: 6180 Accepted: 2670 Special Judge Description Bessie's been appointed the new watch-cow for th原创 2015-01-29 09:36:05 · 485 阅读 · 0 评论 -
欧拉回路,欧拉路
http://www.cnblogs.com/pandy/archive/2009/05/07/1452209.html http://bchine.com/mjmjmtl/?p=241 参考以上: 判断欧拉路,欧拉回路: 注意图联通,可以DFS或者并查集 一.无向图 欧拉回路:每个顶点度数都是偶数 欧拉路:所有点度数为转载 2015-01-29 10:30:36 · 496 阅读 · 0 评论 -
POJ 1041 John's trip(无向图欧拉回路 && 路径)
John's trip Time Limit: 1000MS Memory Limit: 65536K Total Submissions: 7433 Accepted: 2465 Special Judge Description Little Johnny has got a new car. He decided t原创 2015-01-30 09:13:55 · 546 阅读 · 0 评论 -
POJ 2240 Arbitrage(Floyd)
Arbitrage Time Limit: 1000MS Memory Limit: 65536K Total Submissions: 16142 Accepted: 6787 Description Arbitrage is the use of discrepancies in currency exchange rates原创 2014-10-26 20:49:44 · 565 阅读 · 0 评论 -
POJ 2253 Frogger(Floyd)
Frogger Time Limit: 1000MS Memory Limit: 65536K Total Submissions: 26450 Accepted: 8607 Description Freddy Frog is sitting on a stone in the middle of a lake. Suddenl原创 2014-10-26 16:55:31 · 459 阅读 · 0 评论 -
POJ 1125 Stockbroker Grapevine(Dijkstra)
Stockbroker Grapevine Time Limit: 1000MS Memory Limit: 10000K Total Submissions: 27486 Accepted: 15228 Description Stockbrokers are known to overreact to rumours. You原创 2014-10-26 19:36:41 · 592 阅读 · 0 评论 -
确定比赛名次(拓扑排序)
G - 确定比赛名次 Time Limit:1000MS Memory Limit:32768KB 64bit IO Format:%I64d & %I64u Submit Status Description 有N个比赛队(1 Input 输入有若干组,每组中的第一行为二个数N(1 Ou原创 2014-08-01 20:09:50 · 518 阅读 · 0 评论 -
HDU 产生冠军(拓扑排序)
H - 产生冠军 Time Limit:1000MS Memory Limit:32768KB 64bit IO Format:%I64d & %I64u Submit Status Description 有一群人,打乒乓球比赛,两两捉对撕杀,每两个人之间最多打一场比赛。 球赛的规则如下: 如果A打败了B,B又打败了C,而A与C之间没有进行过比原创 2014-08-01 20:08:09 · 578 阅读 · 0 评论 -
HDU 六度分离(Floyd)
A - 六度分离 Time Limit:1000MS Memory Limit:32768KB 64bit IO Format:%I64d & %I64u Submit Status Description 1967年,美国著名的社会学家斯坦利・米尔格兰姆提出了一个名为“小世界现象(small world phenomenon)”的著名假说,大意是说,任原创 2014-08-01 19:57:50 · 973 阅读 · 0 评论 -
HDU 一个人的旅行(Dijkstra)
B - 一个人的旅行 Time Limit:1000MS Memory Limit:32768KB 64bit IO Format:%I64d & %I64u Submit Status Description 虽然草儿是个路痴(就是在杭电待了一年多,居然还会在校园里迷路的人,汗~),但是草儿仍然很喜欢旅行,因为在旅途中 会遇见很多人(白马王子,^0原创 2014-08-01 19:58:17 · 528 阅读 · 0 评论 -
POJ 3687 Labeling Balls(拓扑排序)
Labeling Balls Time Limit: 1000MS Memory Limit: 65536K Total Submissions: 12180 Accepted: 3490 Description Windy has N balls of distinct weights from 1 unit to N unit原创 2015-08-10 15:16:17 · 356 阅读 · 0 评论