代码
#include<iostream>
#include<string>
#include<algorithm>
using namespace std;
const int N = 100;
string s[N];
int main(){
int n,m;
cin >> n >> m;
int cnt = 0;
int flag = 0;
getchar();//注意getchar()读取
for(int i = 1; i <= n; i++){
getline(cin, s[i]);
string tp = s[i];
int pos = tp.find("qiandao");//找不到int类型会返回-1
if(pos == -1)
pos = tp.find("easy");
// cout << pos << endl;
if(pos == -1) cnt++;
if(cnt == m + 1 && flag == 0){
cout << tp;
flag = 1;
}
}
if(!flag)
printf("Wo AK le\n");
return 0;
}
标签:int,老师,回归,L1,include,getchar
From: https://www.cnblogs.com/index-12/p/17339769.html