代码。。能力。。为何。。这么。。弱。。
英语。。为何。。这么。。渣。。
前期打的非常顺,在1个小时的时候甚至到了200+名,然而。。我为何这么弱
我看错了题意,然而却A掉了,一个串只能切一次,后来Hack+4也是靠的这个
1 #include<stdio.h> 2 #include<string.h> 3 #include<algorithm> 4 using namespace std; 5 char s[1005],t[1005],y[1005]; 6 int main() 7 { 8 int i,len,tmp,j,k,x; 9 scanf("%s",s); 10 strcpy(t,"CODEFORCES"); 11 if (strcmp(s,t)==0){printf("YES\n"); return 0; } 12 len=strlen(s); 13 for (i=0;i<len;i++) 14 for (j=i;j<len;j++) 15 { 16 x=-1; 17 for (k=0;k<len;k++) 18 if (k<i||k>j) y[++x]=s[k]; 19 y[x+1]='\0'; 20 if (strcmp(y,t)==0){printf("YES\n"); return 0; } 21 } 22 printf("NO\n"); 23 return 0; 24 }