首页 > TAG信息列表 > Raffle

个人练习-PAT甲级-1124 Raffle for Weibo Followers

题目链接https://pintia.cn/problem-sets/994805342720868352/problems/994805350803292160 题意:给出M个人,从第S个人(包括他)开始,每N个人中奖。每个人最多中奖一次,如果他已经中奖过了,又在中奖的位置,那么奖顺延给下一个人。按输入顺序输出中奖的人的名字。 思路:不难,可以直接做。

1124 Raffle for Weibo Followers (20 分)

1. 题目 John got a full mark on PAT. He was so happy that he decided to hold a raffle(抽奖) for his followers on Weibo -- that is, he would select winners from every N followers who forwarded his post, and give away gifts. Now you are supposed to help him gen

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++;

PAT A1124 Raffle for Weibo Followers [模拟+STL]

题目描述 链接 小明PAT考了满分,高兴之余决定发起微博转发抽奖活动,从转发的网友中按顺序每隔N个人就发出一个红包。请你编写程序帮助他确定中奖名单。注意:可能有人转发多次,但不能中奖多次。所以如果处于当前中奖位置的网友已经中过奖,则跳过他顺次取下一位。按照输入的顺序输出中奖

PAT A1124 Raffle for Weibo Followers (20 分)

John got a full mark on PAT. He was so happy that he decided to hold a raffle(抽奖) for his followers on Weibo -- that is, he would select winners from every N followers who forwarded his post, and give away gifts. Now you are supposed to help him generate

CSU-2019 Fleecing the Raffle

CSU-2019 Fleecing the Raffle Description A tremendously exciting raffle is being held, with some tremendously exciting prizes being given out. All you have to do to have a chance of being a winner is to put a piece of paper with your name on it in the raf