ACM编程题
叁包辣條
这个作者很懒,什么都没留下…
展开
-
hdu 1251 统计难题
题目:http://acm.hdu.edu.cn/showproblem.php?pid=1251 1 #include 2 #include 3 #includestring.h> 4 #include 5 #include 6 using namespace std; 7 8 struct tree{//建立字典树 9 int n;10原创 2017-11-08 14:17:38 · 115 阅读 · 0 评论 -
hdu2013
http://acm.hdu.edu.cn/showproblem.php?pid=2013 1 #include 2 #include 3 #include 4 using namespace std; 5 6 int main() 7 { 8 int n; 9 while(cin>>n)10 {11 in原创 2017-11-08 14:18:23 · 428 阅读 · 0 评论 -
hdu2015
http://acm.hdu.edu.cn/showproblem.php?pid=2015 1 #include 2 #include 3 #include 4 #includestring.h> 5 #include 6 using namespace std; 7 8 int main() 9 {10 //freopen("in.txt"原创 2017-11-08 14:18:28 · 276 阅读 · 0 评论 -
hdu2018
http://acm.hdu.edu.cn/showproblem.php?pid=2018 1 #include 2 #include 3 #include 4 #includestring.h> 5 #include 6 using namespace std; 7 8 int main() 9 {10 int f[60];11原创 2017-11-08 14:18:31 · 251 阅读 · 0 评论 -
hdu1116
http://acm.hdu.edu.cn/showproblem.php?pid=1116 1 #include 2 #include 3 #includestring.h> 4 #include 5 #include 6 using namespace std; 7 const int N=30; 8 int father[N],vis[N]; 9 in原创 2017-11-08 14:18:34 · 261 阅读 · 0 评论 -
hdu1213
http://acm.hdu.edu.cn/showproblem.php?pid=1213 1 #include 2 #include 3 #include 4 #includestring.h> 5 #include 6 using namespace std; 7 const int N=1005; 8 int father[N]; 9 int fin原创 2017-11-08 14:18:39 · 120 阅读 · 0 评论 -
hdu1233
http://acm.hdu.edu.cn/showproblem.php?pid=1233最小生成树,kruskal算法 1 #include 2 #include 3 #includestring.h> 4 #include 5 #include 6 using namespace std; 7 const int N=5005; 8 struct st原创 2017-11-08 14:18:41 · 126 阅读 · 0 评论 -
hdu1875
http://acm.hdu.edu.cn/showproblem.php?pid=18752210 1020 2031 12 21000 1000给定坐标 1 //最小生成树 2 #include 3 #include 4 #include 5 #includestring.h> 6 #include 7 usin原创 2017-11-08 14:18:46 · 199 阅读 · 0 评论 -
hdu1301Jungle Roads
http://acm.hdu.edu.cn/showproblem.php?pid=1301最小生成树模板题 1 #include 2 #include 3 #include 4 #includestring.h> 5 #include 6 using namespace std; 7 const int N=600; 8 struct stu{ 9原创 2017-11-08 14:18:52 · 127 阅读 · 0 评论 -
hdu2012
http://acm.hdu.edu.cn/showproblem.php?pid=2012数组大小算错了。。。。。郁闷-_- 1 #include 2 #include 3 #include 4 #includestring.h> 5 #include 6 using namespace std; 7 const int N=2600; 8 int pri原创 2017-11-08 14:18:20 · 131 阅读 · 0 评论 -
hdu2011
http://acm.hdu.edu.cn/showproblem.php?pid=2011 1 #include 2 #include 3 #include 4 #includestring.h> 5 #include 6 using namespace std; 7 8 int main() 9 {10 int m;11 cin原创 2017-11-08 14:18:17 · 211 阅读 · 0 评论 -
hdu2010
//很闲,刷水。。。。。http://acm.hdu.edu.cn/showproblem.php?pid=2010 1 #include 2 #include 3 #include 4 #include 5 #includestring.h> 6 using namespace std; 7 8 int main() 9 {10 int原创 2017-11-08 14:18:14 · 305 阅读 · 0 评论 -
hdu1247 Hat’s Words
题目:http://acm.hdu.edu.cn/showproblem.php?pid=1247 1 #include 2 #include 3 #include 4 #includestring.h> 5 #include 6 using namespace std; 7 char p[50005][30]; 8 struct tree{//原创 2017-11-08 14:17:43 · 95 阅读 · 0 评论 -
hdu 1075 What Are You Talking About
题目:http://acm.hdu.edu.cn/showproblem.php?pid=1075 1 #include 2 #include 3 #include 4 #includestring.h> 5 #include 6 using namespace std; 7 struct tree{ 8 char c[20]; 9原创 2017-11-08 14:17:46 · 97 阅读 · 0 评论 -
hdu1017
http://acm.hdu.edu.cn/showproblem.php?pid=1017 1 #include 2 #include 3 #include 4 #includestring.h> 5 #include 6 using namespace std; 7 int main() 8 { 9 //freopen("in.txt","r",原创 2017-11-08 14:17:51 · 178 阅读 · 0 评论 -
hdu2717 Catch That Cow
http://acm.hdu.edu.cn/showproblem.php?pid=2717//水搜。。。 1 #include 2 #include 3 #includestring.h> 4 #include 5 #include 6 #include 7 using namespace std; 8 struct stu{ 9 int x;原创 2017-11-08 14:17:54 · 161 阅读 · 0 评论 -
hdu1020 Encoding
http://acm.hdu.edu.cn/showproblem.php?pid=1020过了的就是好孩子。。。。。。。。 1 #include 2 #include 3 #includestring.h> 4 #include 5 #include 6 #include 7 using namespace std; 8 const int N=10005原创 2017-11-08 14:17:57 · 148 阅读 · 0 评论 -
hdu1021 Fibonacci Again
http://acm.hdu.edu.cn/showproblem.php?pid=1021//找规律。。 1 #include 2 #include 3 #include 4 #includestring.h> 5 #include 6 #include 7 using namespace std; 8 9 int main()10 {11原创 2017-11-08 14:18:02 · 122 阅读 · 0 评论 -
hdu1022 Train Problem I
http://acm.hdu.edu.cn/showproblem.php?pid=1022 1 #include 2 #include 3 #include 4 #includestring.h> 5 #include 6 #include 7 using namespace std; 8 const int N=100; 9 10 int main(原创 2017-11-08 14:18:05 · 174 阅读 · 0 评论 -
hdu1031 Design T-Shirt
http://acm.hdu.edu.cn/showproblem.php?pid=1031 1 #include 2 #include 3 #include 4 #includestring.h> 5 #include 6 #include 7 using namespace std; 8 const int N=1000; 9 struct stu{原创 2017-11-08 14:18:10 · 152 阅读 · 0 评论 -
hdu1162Eddy's picture
http://acm.hdu.edu.cn/showproblem.php?pid=1162最小生成树 1 #include 2 #include 3 #include 4 #includestring.h> 5 #include 6 using namespace std; 7 const int N=5005; 8 struct stu{ 9原创 2017-11-08 14:18:57 · 113 阅读 · 0 评论 -
hdu1102
http://acm.hdu.edu.cn/showproblem.php?pid=1102最小生成树(模板题)30 990 692990 0 179692 179 011 2一共3个村子,下面是第i行j列 i村子和j村子之间建路需要的距离下面是一个k代表有k条路已经修好了,1村子和2村子之间以修路 1 #include 2 #include原创 2017-11-08 14:19:00 · 140 阅读 · 0 评论 -
hdu2023 求平均成绩 ~~很闲~~~
1 #include 2 #include 3 #include 4 #includestring.h> 5 #include 6 #include 7 using namespace std; 8 int map[60][10]; 9 int main()10 {11 int n,m;12 while(~scanf("%d%d",&n,原创 2017-11-08 14:19:49 · 322 阅读 · 0 评论 -
hdu2025查找最大元素
1 #include 2 #include 3 #include 4 #include 5 #includestring.h> 6 #include 7 using namespace std; 8 9 int main()10 {11 char str[120];12 while(~scanf("%s",str))13 {原创 2017-11-08 14:19:57 · 216 阅读 · 0 评论 -
hdu2026(water~~)
http://acm.hdu.edu.cn/showproblem.php?pid=2026 1 #include 2 #include 3 #include 4 #includestring.h> 5 #include 6 using namespace std; 7 8 int main() 9 {10 //freopen("in.txt"原创 2017-11-08 14:20:19 · 301 阅读 · 0 评论 -
hdu2027
http://acm.hdu.edu.cn/showproblem.php?pid=2027 1 #include 2 #include 3 #include 4 #include 5 #includestring.h> 6 #include 7 using namespace std; 8 9 int main()10 {11 //fre原创 2017-11-08 14:20:22 · 379 阅读 · 0 评论 -
hdu2029
http://acm.hdu.edu.cn/showproblem.php?pid=2029 1 #include 2 #includestring.h> 3 #include 4 #include 5 #include 6 using namespace std; 7 8 9 int main()10 {11 //freopen("in原创 2017-11-08 14:20:25 · 284 阅读 · 0 评论 -
hdu2030
http://acm.hdu.edu.cn/showproblem.php?pid=2030 1 #include 2 #include 3 #includestring.h> 4 #include 5 using namespace std; 6 7 8 9 int main()10 {11 //freopen("in.txt","r原创 2017-11-08 14:20:28 · 224 阅读 · 0 评论 -
hdu2031
http://acm.hdu.edu.cn/showproblem.php?pid=2031 1 #include 2 #include 3 #includestring.h> 4 #include 5 #include 6 using namespace std; 7 8 int main() 9 {10 //freopen("in.txt"原创 2017-11-08 14:20:33 · 364 阅读 · 0 评论 -
hdu2032
http://acm.hdu.edu.cn/showproblem.php?pid=2032 1 #include 2 #include 3 #includestring.h> 4 #include 5 #include 6 using namespace std; 7 8 9 int main()10 {11 //freopen("in原创 2017-11-08 14:20:36 · 237 阅读 · 0 评论 -
hdu2022(water~~)海选女主角
http://acm.hdu.edu.cn/showproblem.php?pid=2022二B了,没读题直接错了两次。。。。郁闷 1 #include 2 #include 3 #include string.h> 4 #include 5 #include 6 #include 7 using namespace std; 8 int main原创 2017-11-08 14:19:44 · 248 阅读 · 0 评论 -
hdu2021(很闲~~)
http://acm.hdu.edu.cn/showproblem.php?pid=2021water~~~ 1 #include 2 #include 3 #include 4 #includestring.h> 5 #include 6 #include 7 using namespace std; 8 9 int main()10 {11原创 2017-11-08 14:19:41 · 223 阅读 · 0 评论 -
hdu1715
http://acm.hdu.edu.cn/showproblem.php?pid=1715模板大数: 1 #include 2 #include string.h> 3 #include 4 #include 5 #include 6 #include 7 #include 8 #include string> 9 #原创 2017-11-08 14:19:38 · 264 阅读 · 0 评论 -
2015-05-26 随笔
前几天在新闻上看到这样一则事件,一名男孩高考失利无奈下只能在家里经营的超市中帮忙,男孩的性格可以说是较为内向,但是人却说话礼貌,干活伶俐。街坊邻居也很喜欢他,当他有一次过生日希望收到的礼物是一部iphone手机,他母亲当然答应下来,因为这是这个家中的小顶梁柱第一次要的礼物,但是男孩在一次坐车中,因为忘带了钱而把手机压在司机那里,回去取钱,然而这个司机却跑了。男孩因为这件事遭受了打击,最痛苦的事并不原创 2017-11-08 14:19:05 · 121 阅读 · 0 评论 -
hdu2063 过山车
题目:http://acm.hdu.edu.cn/showproblem.php?pid=2063 1 #include 2 #include 3 #include 4 #includestring.h> 5 #include 6 using namespace std; 7 const int N=510; 8 int match[N]; 9 int a[N][N原创 2017-11-08 14:19:10 · 174 阅读 · 0 评论 -
hdu1150 Machine Schedule
http://acm.hdu.edu.cn/showproblem.php?pid=1150最小点覆盖=最大匹配模板题 1 #include 2 #include 3 #include 4 #includestring.h> 5 #include 6 using namespace std; 7 const int N=110; 8 int a[N][N原创 2017-11-08 14:19:15 · 103 阅读 · 0 评论 -
hdu1151 Air Raid
http://acm.hdu.edu.cn/showproblem.php?pid=1151增广路的变种2:DAG图的最小路径覆盖=定点数-最大匹配数 1 #include 2 #include 3 #includestring.h> 4 #include 5 #include 6 using namespace std; 7 const int N=510;原创 2017-11-08 14:19:18 · 175 阅读 · 0 评论 -
hdu1068 Girls and Boys
题目:http://acm.hdu.edu.cn/showproblem.php?pid=1068二分图的最大独立集数=节点数(n)— 最大匹配数(m)另外需要注意的是:本题求出的最大匹配数是实际的两倍需要m/2 1 #include 2 #include 3 #include 4 #includestring.h> 5 #include 6 using n原创 2017-11-08 14:19:21 · 127 阅读 · 0 评论 -
hdu2544 最短路
题目:http://acm.hdu.edu.cn/showproblem.php?pid=2544最短路径DIJKSTRA 1 #include 2 #include 3 #includestring.h> 4 #include 5 #include 6 #include 7 using namespace std; 8 const int N=110;原创 2017-11-08 14:19:25 · 107 阅读 · 0 评论 -
hdu1874 畅通工程续
http://acm.hdu.edu.cn/showproblem.php?pid=1874 1 //标准最短路模板 2 //需要注意的是两点间可能有多组 3 //需要取最短的 4 #include 5 #include 6 #include 7 #includestring.h> 8 #include 9 #include10 using namesp原创 2017-11-08 14:19:28 · 117 阅读 · 0 评论