solution
#include<iostream>
#include<string>
#include<map>
using namespace std;
int main(){
int n, m, s, loop = 0, have = 0;
string id;
map<string, int> mp;
cin >> m >> n >> s;
for(int i = 1; i <= m; i++){//编号从1开始
cin >> id;
if(i == s) {
cout << id << endl;
mp[id] = have = 1;
}
if(i > s) loop++;
if(loop >= n){//到达间隔&&没有中过奖,才能列入中奖名单,否则继续后延
if(!mp.count(id)){//mp.count(key)键值存在返回1,否则返回0
cout << id << endl;
mp[id] = have = 1;
loop = 0;
}
}
}
if(!have) cout << "Keep going...";//没人中奖
return 0;
}