#include <iostream>
#include <string>
#include <map>
using namespace std;
map<string,int> mp;
int main(){
int N,skip,award;
scanf("%d%d%d",&N,&skip,&award);
bool printed=false;
for(int i=1;i<=N;i++){
string s;
cin>>s;
if(i!=award) continue;
if(mp.find(s)==mp.end()){
mp[s]=1;
printf("%s\n",s.c_str());
award+=skip;
printed=true;
}else award++;
}
if(!printed) printf("Keep going...");
return 0;
}
PAT A1124
最新推荐文章于 2020-11-28 20:13:26 发布