标签:print 参考 大于 amp str 技术总结 ace find i++
#include<iostream>
#include<string>
#include<set>
using namespace std;
set<string> sname;
string name[1010];
int main(){
int m, n, s;
scanf("%d%d%d", &m, &n, &s);
for(int i = 1; i <= m; i++){
// scanf("%s", name[i]);
cin >> name[i];
}
if(m < s) printf("Keep going...");
else{
int i = s;
while(i <= m){
if(i != s && sname.find(name[i]) != sname.end()){
i += 1;
continue;
}
// printf("%s\n", name[i]);
cout << name[i] << endl;
sname.insert(name[i]);
i += n;
}
}
return 0;
}
A1124 Raffle for Weibo Followers (20分)
标签:print 参考 大于 amp str 技术总结 ace find i++
原文地址:https://www.cnblogs.com/tsruixi/p/13056455.html