上进小青年

导航

2016年9月3日

CCF真题Z型输出

摘要: 1 #include<stdio.h> 2 #include<iostream> 3 #include<string.h> 4 #include<algorithm> 5 using namespace std; 6 int main() 7 { 8 int n; 9 int a[505][105] 阅读全文

posted @ 2016-09-03 16:24 上进小青年 阅读(177) 评论(0) 推荐(0) 编辑

sort函数CCF

摘要: 题是比较水的啦,但是好久没有用sort函数啦,有点生疏^...^ 1 #include<stdio.h> 2 #include<string.h> 3 #include<iostream> 4 #include<algorithm> 5 using namespace std; 6 struct s 阅读全文

posted @ 2016-09-03 13:00 上进小青年 阅读(235) 评论(0) 推荐(0) 编辑

2016年9月1日

Prim算法POJ1258

摘要: http://poj.org/problem?id=1258 这道题是最简单的一个啦,,,, 1 #include<stdio.h> 2 #include<iostream> 3 #include<string.h> 4 #include<algorithm> 5 using namespace s 阅读全文

posted @ 2016-09-01 20:27 上进小青年 阅读(167) 评论(0) 推荐(0) 编辑

HDU 1856

摘要: http://acm.split.hdu.edu.cn/showproblem.php?pid=1856 对于这道题,主要就是让你求出有最多结点的树的树叶; 我们只要利用并查集的知识吧所输入的数据连接成树,然后逐一找出树叶最多的树就可以。利用一个num数组,在最开始的时候每个节点自己是一颗树,num 阅读全文

posted @ 2016-09-01 18:19 上进小青年 阅读(115) 评论(0) 推荐(0) 编辑

2016年8月31日

HDU1325

摘要: http://acm.split.hdu.edu.cn/showproblem.php?pid=1325 1 #include<stdio.h> 2 #include<algorithm> 3 #include<string.h> 4 #include<iostream> 5 using names 阅读全文

posted @ 2016-08-31 22:52 上进小青年 阅读(96) 评论(0) 推荐(0) 编辑

HDU1272

摘要: http://acm.split.hdu.edu.cn/showproblem.php?pid=1272 对于这道题,只要找出形成的图是不是连通无环的图即可。即是判断输入的两个点是否来自同一个父亲结点。还要注意不要忘记这个图一定是互相连通的。另外注意当输入两个0的时候也是输出Yes 1 #inclu 阅读全文

posted @ 2016-08-31 10:23 上进小青年 阅读(94) 评论(0) 推荐(0) 编辑

2016年8月30日

HDU1213

摘要: http://acm.split.hdu.edu.cn/showproblem.php?pid=1213 1 #include<stdio.h> 2 #include<algorithm> 3 #include<iostream> 4 #include<string.h> 5 using names 阅读全文

posted @ 2016-08-30 20:35 上进小青年 阅读(87) 评论(0) 推荐(0) 编辑

HDU1116图论

摘要: http://acm.split.hdu.edu.cn/showproblem.php?pid=1116 1 #include<stdio.h> 2 #include<algorithm> 3 #include<iostream> 4 #include<string.h> 5 using names 阅读全文

posted @ 2016-08-30 19:26 上进小青年 阅读(147) 评论(0) 推荐(0) 编辑

HDU1232畅通工程

摘要: http://acm.split.hdu.edu.cn/showproblem.php?pid=1232 1 ///1232 2 #include<stdio.h> 3 #include<string.h> 4 #include<iostream> 5 #include<algorithm> 6 u 阅读全文

posted @ 2016-08-30 19:21 上进小青年 阅读(129) 评论(0) 推荐(0) 编辑

2016年8月28日

欧拉路径Hrbust1351

摘要: http://acm.hrbust.edu.cn/index.php?m=ProblemSet&a=showProblem&problem_id=1351 这道题先利用并查集的知识点,把输入的数据连结起来,形成一个树,然后再逐个结点判断。如果所有的结点都能相连,那么这是一个连通的路径,否则直接跳出, 阅读全文

posted @ 2016-08-28 21:50 上进小青年 阅读(124) 评论(0) 推荐(0) 编辑