- 博客(9)
- 资源 (1)
- 收藏
- 关注
原创 HDU 1312 Red and Black(简单广搜)
题目呀链接:http://acm.hdu.edu.cn/showproblem.php?pid=1312 #include #include #include using namespace std; char map[22][22]; int W,H; int dx[]={0,1,0,-1}; int dy[]={1,0,-1,0}; int bfs(int x,int y) { qu
2013-12-07 21:15:20 647
原创 hdu 1597 find the nth digit
题目链接:http://acm.hdu.edu.cn/showproblem.php?pid=1597 //用C++交能过,G++交就不能过,不知道为什么 #include int main() { int T; scanf("%d",&T); while(T--) { int n,i=1; scanf("%d",&n);
2013-12-07 11:00:19 463
原创 hdu 1062 Text Reverse
题目连接:http://acm.hdu.edu.cn/showproblem.php?pid=1062 #include #include int main() { int T; scanf("%d",&T); getchar(); while(T--) { char s[1010]; gets(s); in
2013-12-06 20:17:14 431
原创 HDU 1113 Word Amalgamation
题目链接:http://acm.hdu.edu.cn/showproblem.php?pid=1113 本题目用map图做的话就很简当了 #include #include #include #include using namespace std; int main() { string s,t; map M;//建一个下标为字符串的,存东西也是字符串的M; whil
2013-12-06 11:29:58 465
原创 HDU 1978 How many ways(dfs)
题目链接:http://acm.hdu.edu.cn/showproblem.php?pid=1978 #include #include #include using namespace std; int num[105][105],dp[105][105],n,m; int judge(int x,int y) { if(x>=1&&y>=1&&x<=n&&y<=m) return
2013-12-05 19:59:29 481
原创 HDU 2084 数塔(DP)
题目链接:http://acm.hdu.edu.cn/showproblem.php?pid=2084 #include #include #include using namespace std; int map[102][102]; int main() { int i,j,N; int T; scanf("%d",&T); while(T--) {
2013-12-05 16:27:20 412
原创 HDU 1251 统计难题(字典树)
题目连接:http://acm.hdu.edu.cn/showproblem.php?pid=1251#include #include #include #define LED struct node struct node { int n; struct node *next[26]; }; struct node *root; struct node *build() {
2013-12-03 19:20:47 398
原创 HDU 1285 确定比赛名次
题目链接:http://acm.hdu.edu.cn/showproblem.php?pid=1285 #include #include #include using namespace std; int main() { int in[505],map[505][505],len[505],N,M,x,y,min,i,count; while(cin>>N>>M) {
2013-12-03 19:12:44 399
原创 HDU 1247 Hat’s Words(字典树)
题目链接:http://acm.hdu.edu.cn/showproblem.php?pid=1247 #include #include #include #include char str1[16],str2[16],map[50005][16]; using namespace std; struct node { bool flag; node *next[26];
2013-12-03 19:08:51 373
空空如也
TA创建的收藏夹 TA关注的收藏夹
TA关注的人