随笔分类 - 图论
uva 10801(最短路)
摘要:题目大意:有一层不超过100层的大楼, 有n个电梯,它们的速度都不同。 而且每个电梯只能到达指定的那些楼层,而且它们都有各自的速度(即上升一层或下降一层所用的时间)。 如果一个人在某层走出电梯,要换一个电梯乘,那么他要等60秒(不管要等的是那个电梯,即使是刚刚出来的那个电梯也要等60秒)。在0层搭电...
阅读全文
uva 820(最大流)
摘要:最大流的裸题,直接贴了模板。#include #include #include #include #include #include #include #include #include #include #include #include #include using namespace std...
阅读全文
uva 12549
摘要:12549 - Sentry RobotsTime limit: 1.000 secondsWe need to guard a set of points of interest using sentry robots that cannot move or turn. We can positi...
阅读全文
UVA 1349(二分图匹配)
摘要:1349 - Optimal Bus Route DesignTime limit: 3.000 secondsA big city wants to improve its bus transportation system. One of the improvement is to add sc...
阅读全文
二分图最大权最小权完美匹配模板KM
摘要:在网上找了一份挺好的模板,先标一下哦~链接君:http://blog.csdn.net/abcjennifer/article/details/5844579#include #include #include #include using namespace std;int max(int a,i...
阅读全文
uva 1001(最短路)
摘要:题意:在一个三维的奶酪里面有n(n#include #include #include #include #include #include #include #include #include #include #include #include using namespace std;#defi...
阅读全文
uva 1151(最小生成树,枚举子集)
摘要:题意:平面上有n个点(1#include #include #include #include #include #include #include #include #include #include #include #include using namespace std;#define ll...
阅读全文
uva 1658(最小费用最大流)
摘要:题意:一个带权有向图,求起点到终点的两条路径权值之和最小,且两条路径没有公共点(除起点,终点);分析:拆点法,将u拆成u和u',u-u'容量为1,费用为0,这样就能保证每个点只用一次,起点s-s'容量为2,终点t-t'容量为2保证最大流会求出两条路径,若输入u-v,权为c,则增加边u'-v,容量为1...
阅读全文
uva 1660 & poj 1966(点连通度)
摘要:Cable TV NetworkTime Limit:1000MSMemory Limit:30000KTotal Submissions:4267Accepted:2003DescriptionThe interconnection of the relays in a cable TV netw...
阅读全文
hdu 1532(最大流)
摘要:Drainage DitchesTime Limit: 2000/1000 MS (Java/Others)Memory Limit: 65536/32768 K (Java/Others)Total Submission(s): 12771Accepted Submission(s): 6097P...
阅读全文
uva 11624(bfs)
摘要:11624 - Fire!Time limit: 1.000 secondsJoe works in a maze. Unfortunately, portions of the maze havecaught on re, and the owner of the maze neglected ...
阅读全文
浙公网安备 33010602011771号