1124 Raffle for Weibo Followers (20 分)
作者:互联网
水~。
const int N=1010;
string a[N];
unordered_set<string> S;
int n,step,idx;
int main()
{
cin>>n>>step>>idx;
for(int i=1;i<=n;i++) cin>>a[i];
for(int i=idx;i<=n;)
{
if(S.count(a[i])) i++;
else
{
cout<<a[i]<<endl;
S.insert(a[i]);
i+=step;
}
}
if(S.size() == 0) puts("Keep going...");
//system("pause");
return 0;
}
标签:Raffle,Weibo,set,idx,int,step,Followers 来源: https://www.cnblogs.com/fxh0707/p/14490149.html