上一页 1 ··· 107 108 109 110 111 112 113 114 115 ··· 182 下一页
摘要: 简单题View Code #include<iostream>#include<cstdio>#include<cstdlib>#include<cstring>usingnamespacestd;#definemaxn555charst[maxn][maxn];intdir[4][2]={{0,1},{1,0},{0,-1},{-1,0}};intn,m;boolok(intx,inty){if(x<0||y<0||x>=n||y>=m)returnfalse;if(st[x][y]!=0)returnfalse;ret 阅读全文
posted @ 2011-07-13 20:42 undefined2024 阅读(262) 评论(0) 推荐(0)
摘要: 简单题printf("%x", d) 十六进制View Code #include<iostream>#include<cstdio>#include<cstdlib>#include<cstring>usingnamespacestd;intr,x,y;intmain(){//freopen("t.txt","r",stdin);scanf("%x,%d,%d",&r,&x,&y);inta=1;if((a<<x)&r)r 阅读全文
posted @ 2011-07-13 20:26 undefined2024 阅读(152) 评论(0) 推荐(0)
摘要: trieView Code #include<iostream>#include<cstdio>#include<cstdlib>#include<cstring>usingnamespacestd;#definemaxl15#definemaxn10005structNode{Node*next[10];boolhave;boolend;}trie[maxn*maxl];intn;charst[maxl];intncount;boolins(Node*proot,char*st){if(proot->end)returnfalse;if( 阅读全文
posted @ 2011-07-13 20:00 undefined2024 阅读(230) 评论(0) 推荐(0)
摘要: dpView Code #include<iostream>#include<cstdio>#include<cstdlib>#include<cstring>usingnamespacestd;intf[6][50];intmain(){//freopen("t.txt","r",stdin);memset(f,0,sizeof(f));f[0][0]=1;for(inti=1;i<=5;i++)for(intj=0;j<=9*i;j++)for(intk=0;k<=9;k++){if( 阅读全文
posted @ 2011-07-13 19:12 undefined2024 阅读(252) 评论(0) 推荐(0)
摘要: bfsView Code #include <iostream>#include <cstdio>#include <cstdlib>#include <cstring>using namespace std;#define maxx 1005#define inc 502#define maxn maxx * maxxstruct Point{ int x, y;} q[maxx * maxx];int n, cx, cy;bool vis[maxx][maxx];bool map[maxx][maxx];int dist[maxx][maxx 阅读全文
posted @ 2011-07-13 11:05 undefined2024 阅读(138) 评论(0) 推荐(0)
上一页 1 ··· 107 108 109 110 111 112 113 114 115 ··· 182 下一页