会员
众包
新闻
博问
闪存
赞助商
HarmonyOS
Chat2DB
所有博客
当前博客
我的博客
我的园子
账号设置
会员中心
简洁模式
...
退出登录
注册
登录
null1019
博客园
首页
新随笔
联系
订阅
管理
上一页
1
···
29
30
31
32
33
34
35
36
37
···
52
下一页
2014年5月13日
hdu 1558 Segment set
摘要: http://acm.hdu.edu.cn/showproblem.php?pid=1558先判断线段相交,然后用并查集合并。 1 #include 2 #include 3 #include 4 #define maxn 20000 5 using namespace std; 6 7 i...
阅读全文
posted @ 2014-05-13 20:47 null1019
阅读(141)
评论(0)
推荐(0)
2014年5月8日
hdu 1272 小希的迷宫
摘要: http://acm.hdu.edu.cn/showproblem.php?pid=1272 1 #include 2 #include 3 #include 4 #define maxn 50000 5 using namespace std; 6 7 int in[maxn...
阅读全文
posted @ 2014-05-08 21:17 null1019
阅读(109)
评论(0)
推荐(0)
hdu 1325 Is It A Tree?
摘要: http://acm.hdu.edu.cn/showproblem.php?pid=1325 1 #include 2 #include 3 #include 4 #define maxn 5000 5 using namespace std; 6 7 int in[maxn]...
阅读全文
posted @ 2014-05-08 21:13 null1019
阅读(123)
评论(0)
推荐(0)
2014年5月7日
hdu 1213 How Many Tables
摘要: http://acm.hdu.edu.cn/showproblem.php?pid=1213 1 #include 2 #include 3 #include 4 #define maxn 2000 5 using namespace std; 6 7 int f[maxn],n,m; 8 ...
阅读全文
posted @ 2014-05-07 20:12 null1019
阅读(129)
评论(0)
推荐(0)
hdu 3047 Zjnu Stadium
摘要: http://acm.hdu.edu.cn/showproblem.php?pid=3047带权并差集 1 #include 2 #include 3 #include 4 #define maxn 60000 5 using namespace std; 6 7 int f[maxn],d...
阅读全文
posted @ 2014-05-07 19:48 null1019
阅读(131)
评论(0)
推荐(0)
hdu 3635 Dragon Balls
摘要: http://acm.hdu.edu.cn/showproblem.php?pid=3635 1 #include 2 #include 3 #include 4 #define maxn 20000 5 using namespace std; 6 7 int f[maxn]; 8 int...
阅读全文
posted @ 2014-05-07 18:50 null1019
阅读(114)
评论(0)
推荐(0)
2014年5月6日
hdu 1856 More is better
摘要: http://acm.hdu.edu.cn/showproblem.php?pid=1856这道题就是求一个集合里面最大的个数。 基本的并查集加一个步骤,将合并后的元素的个数保存在新的树根中。 1 #include 2 #include 3 #include 4 #define maxn 10...
阅读全文
posted @ 2014-05-06 20:57 null1019
阅读(147)
评论(0)
推荐(0)
hdu 1690 Bus System
摘要: http://acm.hdu.edu.cn/showproblem.php?pid=1690 1 #include 2 #include 3 #include 4 #include 5 #include 6 #define maxn 500 7 #define LL __int64 8 u...
阅读全文
posted @ 2014-05-06 19:43 null1019
阅读(148)
评论(0)
推荐(0)
hdu 3191 How Many Paths Are There
摘要: http://acm.hdu.edu.cn/showproblem.php?pid=3191这道题求次短路经和路径数 1 #include 2 #include 3 #include 4 #include 5 #include 6 #define maxn 2000 7 us...
阅读全文
posted @ 2014-05-06 18:58 null1019
阅读(187)
评论(0)
推荐(0)
hdu 1688 Sightseeing
摘要: http://acm.hdu.edu.cn/showproblem.php?pid=1688这道题就是求最短路路径和次短路路径的条数。用一个二维数组记录每一个节点距离起始点的最短距离和次短距离,再开一个二维数组记录路径数更新状态时:1)新值小于最短路径长:更新最短路径长,计数;次短路径长,计数2)新...
阅读全文
posted @ 2014-05-06 18:54 null1019
阅读(396)
评论(0)
推荐(0)
上一页
1
···
29
30
31
32
33
34
35
36
37
···
52
下一页
公告