- 博客(8)
- 问答 (1)
- 收藏
- 关注
原创 hdu 1075 What Are You Talking About
题目链接:http://acm.hdu.edu.cn/showproblem.php?pid=1075 字典树,在节点处存在单词。 #include #include #include using namespace std; int up; char s1[5000],s2[5000],s[10000]; struct { char s[50]; int nu
2012-09-30 20:37:39 562
原创 hdu 1010 Tempter of the Bone
题目链接:http://acm.hdu.edu.cn/showproblem.php?pid=1010 一开始以为是BFS....... 结果WA了; 查了下结题报告,原来是DFS; 结果TLE了; 原来还要传说中的奇偶剪枝... Orz.... #include #include #include using namespace std; int abs(int a,int
2012-09-30 18:31:51 483
原创 hdu 1671 Phone list
题目链接:http://acm.hdu.edu.cn/showproblem.php?pid=1671 题意:如果一个电话号码是另一个的前缀就输出NO,否则YES; 字典树; #include #include #include using namespace std; int t,n,up; char s[10010][15]; struct { int num; int
2012-09-30 16:04:05 517
原创 POJ 2421 Constructing Roads
题目链接:http://poj.org/problem?id=2421 kruskal最小生生成树+并查集,当输入已连接的点时,把他们的祖先统一 #include #include #include using namespace std; int p[150],n,q,k; struct all { int u,v,w; }e[10010]; int cmp(all
2012-09-29 14:36:05 549
原创 hdu 1800 Flying to the Mars
题目链接:http://acm.hdu.edu.cn/showproblem.php?pid=1800 注意到任意俩个相同的数字不能用同一个 broomstick,所以就是统计每个数字出现的次数,最多的一个即答案。 #include #include #include using namespace std; int cmp(int a,int b) { retur
2012-09-26 15:03:41 639
原创 HDU 2102 A计划
题目链接:http://acm.hdu.edu.cn/showproblem.php?pid=2102 BFS的迷宫问题,和一般的BFS一样。 注意:1.如果#的对面是'*',那么‘#’就要变成‘*’。 2.如果#的对面是'#',那么‘#’就要变成‘*’。 #include #include #include #include using n
2012-09-24 16:19:53 1415
原创 hdu 2112 HDU Today
题目链接:http://acm.hdu.edu.cn/showproblem.php?pid=2112 用数字来代替字符串,就是一道最短路。 注意:1.有重边。 2.当起点和终点一样时,输出0。而且输出应在该组数据输入完后。 3.点数不定,所以输入时,要记下不同的点的个数。 #include #include #include
2012-09-15 20:51:54 886
原创 POJ 3667 HOTEL 线段树
题目链接:http://poj.org/problem?id=3667 明显感觉到自己英语不行.......读题好生痛苦。 大意:有n个连续的房间(1~~n编号),然后有一批一批的人来住,每批人需要的房间必须连续。 (1) 1 a: 表示,来了一批人,需要a个连续的空房间,如果有a个连续的空房间,就输出最左边房间的编号,否则输出0; (2
2012-09-12 16:28:58 614
空空如也
求教,hadoop-2.2.0升级hadoop-2.6.0。
2015-09-06
TA创建的收藏夹 TA关注的收藏夹
TA关注的人