#include<cstdlib> #include<cmath> #include<cstdio> #include<algorithm> #include<iostream> #include<cstring> using namespace std; int main(){ char str[1000]; int len; bool flag; while(gets(str)!=NULL) { int j; len=strlen(str); flag=false; for( j=0;j<len;j++) { if((str[j]=='S'||str[j]=='s')&&(str[j+1]=='A'||str[j+1]=='a')&&(str[j+2]=='L'||str[j+2]=='l')&&(str[j+3]=='T'||str[j+3]=='t')) { flag=true; break; } } if(flag) printf("%s\n",str); } return 0; } |
Double click to view unformatted code.