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 |
请问各位大虾,谁能帮我看看是什么问题呀?#include<stdio.h> int main() { char out[1000000]; char c; int i=0; while((c=getchar())!='EOF') { if(c>='a'&&c<='z'||c==' '||c=='\n'||c=='\t') { if(c=='i'&&i>1&&out[i-1]=='e') { if(out[i-2]=='c') out[i++]=c; else { out[i-1]='i'; out[i++]='e'; } } else if(c=='d'&&i>0) { if(out[i-1]=='d') out[i-1]='p'; else out[i++]='d'; } else if(c=='k'&&i>2&&out[i-1]=='n'&&out[i-2]=='i'&&out[i-3]=='p') { out[i+1]='d'; out[i]='y'; out[i-1]='o'; out[i-2]='l'; out[i-3]='f'; i=i+2; } else out[i++]=c; } else continue; } for(int j=0;j<i+1;j++) printf("%c",out[j]); printf("\n"); return 0; } Followed by:
Post your reply here: |
All Rights Reserved 2003-2013 Ying Fuchen,Xu Pengcheng,Xie Di
Any problem, Please Contact Administrator