Online Judge | Problem Set | Authors | Online Contests | User | ||||||
---|---|---|---|---|---|---|---|---|---|---|
Web Board Home Page F.A.Qs Statistical Charts | Current Contest Past Contests Scheduled Contests Award Contest |
为什么WA 啊!哪位高手告诉我一下!#include "stdio.h" #include "string.h" int main() { char a[101][71],b[7]; int m,i,k; strcpy(a[0],"http://www.acm.org/"); m=0; i=0; while(scanf("%s",b)!=EOF) { if(b[0]=='V') { i=m+1; scanf("%s",a[i]); printf("%s\n",a[i]); m=i; k=i+1; for(;k<101;k++) a[k][0]=0; } else if(b[0]=='B') { m--; if(m<0) {printf("Ignored\n");m++;} else printf("%s\n",a[m]); } else if(b[0]=='F') { m++; if(a[m][0]=='h'&&m<70) printf("%s\n",a[m]); else {printf("Ignored\n");m--;} } else if(b[0]=='Q') break; } return 0; } Followed by: Post your reply here: |
All Rights Reserved 2003-2013 Ying Fuchen,Xu Pengcheng,Xie Di
Any problem, Please Contact Administrator