输入样例1:
5 1
L1-1 is a qiandao problem.
L1-2 is so...easy.
L1-3 is Easy.
L1-4 is qianDao.
Wow, such L1-5, so easy.
输出样例1:
L1-4 is qianDao.
输入样例2:
5 4
L1-1 is a-qiandao problem.
L1-2 is so easy.
L1-3 is Easy.
L1-4 is qianDao.
Wow, such L1-5, so!!easy.
输出样例2:
Wo AK le
每遇到一个需要做的题目,就把m–,
如果m<0了,说明当前这道题是吉老师正在看的题,输出即可。
如果到最后也没有出现m<0的情况,说明吉老师已经做的题目≥一共需要做的题目,也就是AK了。
#include <iostream>
#include <stdio.h>
#include <math.h>
#include <string.h>
#include <cstring>
#include <sstream>
#include <stdlib.h>
#include <map>
#include <stack>
#include <queue>
#include <vector>
using namespace std;
typedef long long ll;
int main()
{
int n,m;
cin>>n>>m;
string in;
getchar();
for (int i=0;i<n;i++){
getline(cin,in);
if (in.find("qiandao")!=in.npos||in.find("easy")!=in.npos){
continue;
}
m--;
if (m<0){
cout<<in<<endl;
return 0;
}
}
cout<<"Wo AK le"<<endl;
return 0;
}