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,否则返回0cout << id << endl;mp[id] = have = 1;loop = 0;}}}if(!have) cout << "Keep going...";//没人中奖return 0;
}