上一页 1 ··· 28 29 30 31 32 33 34 35 36 ··· 52 下一页
摘要: http://acm.hdu.edu.cn/showproblem.php?pid=3938这道题一开始没看懂题意,看了别人的博客之后才理解题意。用的是离线的并查集,输入完之后再处理。问的是在小于等于L的路径数。 1 #include 2 #include 3 #include 4 #defi... 阅读全文
posted @ 2014-05-18 19:51 null1019 阅读(198) 评论(0) 推荐(0)
摘要: http://acm.hdu.edu.cn/showproblem.php?pid=3461并差集和幂取模这道题主要是求不可操作区间。 1 #include 2 #include 3 #include 4 #include 5 #define maxn 10000010 6 #define ... 阅读全文
posted @ 2014-05-18 16:25 null1019 阅读(134) 评论(0) 推荐(0)
摘要: http://acm.hdu.edu.cn/showproblem.php?pid=1811拓扑排序和并差集 1 #include 2 #include 3 #include 4 #include 5 #include 6 #define maxn 10010 7 using... 阅读全文
posted @ 2014-05-18 13:47 null1019 阅读(167) 评论(0) 推荐(0)
摘要: http://acm.hdu.edu.cn/showproblem.php?pid=3038 1 #include 2 #include 3 #include 4 #define maxn 600000 5 using namespace std; 6 7 int f[maxn],d[max... 阅读全文
posted @ 2014-05-17 23:40 null1019 阅读(101) 评论(0) 推荐(0)
摘要: http://acm.hdu.edu.cn/showproblem.php?pid=3172 1 #include 2 #include 3 #include 4 #include 5 #include 6 #define maxn 200010 7 using namespace std... 阅读全文
posted @ 2014-05-17 22:58 null1019 阅读(113) 评论(0) 推荐(0)
摘要: http://acm.hdu.edu.cn/showproblem.php?pid=2680这道题是有向图。把全部可以出发的点进队列spfa就可以。 1 #include 2 #include 3 #include 4 #include 5 #include 6 #define maxn ... 阅读全文
posted @ 2014-05-17 18:10 null1019 阅读(92) 评论(0) 推荐(0)
摘要: http://acm.hdu.edu.cn/showproblem.php?pid=2807第一次做矩阵乘法,没有优化超时,看了别人的优化的矩阵乘法,就过了。 1 #include 2 #include 3 #include 4 #include 5 #define maxn 100 6 u... 阅读全文
posted @ 2014-05-17 00:58 null1019 阅读(227) 评论(0) 推荐(0)
摘要: http://acm.hdu.edu.cn/showproblem.php?pid=3832 1 #include 2 #include 3 #include 4 #include 5 #include 6 #include 7 #include 8 #define maxn 1001... 阅读全文
posted @ 2014-05-16 16:54 null1019 阅读(195) 评论(0) 推荐(0)
摘要: http://acm.hdu.edu.cn/showproblem.php?pid=2112 1 #include 2 #include 3 #include 4 #include 5 #include 6 #include 7 #define maxn 6000 8 using nam... 阅读全文
posted @ 2014-05-15 23:42 null1019 阅读(147) 评论(0) 推荐(0)
摘要: http://acm.hdu.edu.cn/showproblem.php?pid=2473并查集设置虚拟父节点。 1 #include 2 #include 3 #include 4 #define maxn 1100000 5 using namespace std; 6 7 int f... 阅读全文
posted @ 2014-05-14 21:52 null1019 阅读(123) 评论(0) 推荐(0)
上一页 1 ··· 28 29 30 31 32 33 34 35 36 ··· 52 下一页