02 2013 档案
摘要:一、单源最短路1、正权dijkstra2、任意权2、1 bellman-ford2、2 spfa二、任意点之间最短路floyd三、最短路的应用:差分约束系统参考模板http://www.toposort.com/blog/shortest-path.html贴一个新的最新的spfa模板: 1 #in...
阅读全文
摘要:题目:http://acm.hdu.edu.cn/showproblem.php?pid=2094//声明:该题不是我写的。 1 #include 2 #include 3 int nu,m,sum; 4 int map[1001][1001]; 5 int degree[1001]; 6...
阅读全文
摘要:1 #include 2 #include 3 int count,n,degree[505],map[505][505],vis[505],res[505]; 4 5 void topo(int x) 6 { 7 res[count] = x; 8 count++; 9 ...
阅读全文

浙公网安备 33010602011771号