上一页 1 ··· 30 31 32 33 34 35 36 37 38 ··· 52 下一页
摘要: http://acm.hdu.edu.cn/showproblem.php?pid=1599floyd找最小环。 1 #include 2 #include 3 #include 4 #define maxn 200 5 using namespace std; 6 const int inf... 阅读全文
posted @ 2014-05-04 19:55 null1019 阅读(141) 评论(0) 推荐(0) 编辑
摘要: http://acm.hdu.edu.cn/showproblem.php?pid=1598 1 #include 2 #include 3 #include 4 #define maxn 2000 5 using namespace std; 6 const int inf=1<<30; 7... 阅读全文
posted @ 2014-05-04 19:19 null1019 阅读(102) 评论(0) 推荐(0) 编辑
摘要: http://codeforces.com/contest/424/problem/C 1 #include 2 #include 3 #include 4 #include 5 #define maxn 1000001 6 using namespace std; 7 8 int f[m... 阅读全文
posted @ 2014-04-28 22:14 null1019 阅读(85) 评论(0) 推荐(0) 编辑
摘要: http://acm.hdu.edu.cn/showproblem.php?pid=1596 1 #include 2 #include 3 #include 4 #define maxn 1001 5 using namespace std; 6 7 double g[maxn][maxn... 阅读全文
posted @ 2014-04-27 20:57 null1019 阅读(101) 评论(0) 推荐(0) 编辑
摘要: http://acm.hdu.edu.cn/showproblem.php?pid=1595这道题我用spfa在枚举删除边的时候求最短路超时,改用dijkstra就过了。 1 #include 2 #include 3 #include 4 #include 5 #define m... 阅读全文
posted @ 2014-04-27 20:11 null1019 阅读(222) 评论(0) 推荐(0) 编辑
摘要: http://acm.hdu.edu.cn/showproblem.php?pid=1548 1 #include 2 #include 3 #include 4 #include 5 #include 6 #define maxn 300 7 using namespace std; 8... 阅读全文
posted @ 2014-04-26 18:27 null1019 阅读(105) 评论(0) 推荐(0) 编辑
摘要: http://acm.hdu.edu.cn/showproblem.php?pid=1546 1 #include 2 #include 3 #include 4 #include 5 #include 6 #define maxn 1001 7 using namespace std; ... 阅读全文
posted @ 2014-04-26 16:32 null1019 阅读(109) 评论(0) 推荐(0) 编辑
摘要: http://acm.hdu.edu.cn/showproblem.php?pid=1535这道题两遍spfa,第一遍sfpa之后,重新建图,所有的边逆向建边,再一次spfa就可以了。 1 #include 2 #include 3 #include 4 #include 5 #includ... 阅读全文
posted @ 2014-04-25 21:23 null1019 阅读(144) 评论(0) 推荐(0) 编辑
摘要: http://acm.hdu.edu.cn/showproblem.php?pid=1142这道题是spfa求最短路,然后dfs()求路径数。 1 #include 2 #include 3 #include 4 #include 5 #define maxn 1001 6 us... 阅读全文
posted @ 2014-04-24 20:32 null1019 阅读(126) 评论(0) 推荐(0) 编辑
摘要: http://acm.hdu.edu.cn/showproblem.php?pid=1245 1 #include 2 #include 3 #include 4 #include 5 #include 6 #define maxn 500 7 using namespace... 阅读全文
posted @ 2014-04-23 15:41 null1019 阅读(94) 评论(0) 推荐(0) 编辑
上一页 1 ··· 30 31 32 33 34 35 36 37 38 ··· 52 下一页