此题用strstr函数会更简单(字符串中没有另一字符串就为NULL)
#include<stdio.h>
#include<string.h>
int main(){
int n,m;
scanf("%d %d",&n,&m);
getchar();//去\n
char a[31][520];
int count=0;
for(int i=0;i<n;i++){
gets(a[i]);
if(strstr(a[i],"qiandao")==NULL&&strstr(a[i],"easy")==NULL){
count++;//用strstr找a[i]中有没有字符串
}else {
continue;
}if(count==m+1){//因为是做完了,所以要到m+1题
printf("%s",a[i]);
}
}if(count<=m){printf("Wo AK le");}//全做完了
return 0;
}