摘要: #include#include//通过只记录每一步此时点的状态。题非常好#includeusing namespace std;#define N 110int map[N][N][30];//一共最多16种状态,记录状态和此时已得到宝物的多少char ma[N][N];//读入struct no... 阅读全文
posted @ 2013-11-18 20:35 HYDhyd 阅读(92) 评论(0) 推荐(0) 编辑
摘要: #include#include#define N 200100char s[N];int main() {int i;while(scanf("%s",s)!=EOF) { if(strlen(s)=3) {if(s[i]==s[i-1]&&s[i-2]==s[i-3]) {s[i]=s[i... 阅读全文
posted @ 2013-11-18 17:33 HYDhyd 阅读(113) 评论(0) 推荐(0) 编辑
摘要: #include#includestruct node {int num,i;node *a[27];char s[20];//定义局部不是空的node() {num=0;for(i=0;ia[s1[i]-'a']==NULL)root->a[s1[i]-'a']=new node();root=r... 阅读全文
posted @ 2013-11-18 17:07 HYDhyd 阅读(131) 评论(0) 推荐(0) 编辑
摘要: #include#includeint main() { int a,i,n,m=0; double d=1000; char s[30],ch; for(i=1;i='0'&&s[i]<='9') n=n*10+s[i]-'0'; ... 阅读全文
posted @ 2013-11-18 13:03 HYDhyd 阅读(128) 评论(0) 推荐(0) 编辑
摘要: #include#include#include#define N 1100struct node { int x,y;}map[N];int s[N];int pre[N];int find(int n) { if(n!=pre[n]) pre[n]=find(pre[n]); return p... 阅读全文
posted @ 2013-11-18 13:01 HYDhyd 阅读(95) 评论(0) 推荐(0) 编辑