题意:水题,直接贴代码了。(为什么我第一遍做的时候代码写的那么烦?)

代码:

#include <iostream>
#include <string>
#include <vector>
#include <map>
#include <fstream>
using namespace std;

int main()
{
    //ifstream cin("pat.txt");
    int forwardCnt,step,start;
    cin>>forwardCnt>>step>>start;
    string name;
    vector<string> vec(forwardCnt),win;
    map<string,int> mp;//标记已获奖的人
    int skip=step;
    ;i<forwardCnt;i++)
        cin>>vec[i];
    if(start>vec.size()) cout<<"Keep going...";
    else{
        ;//从第一个中奖者开始
        while(i<vec.size()){
            string query=vec[i];
            ){//该用户在此前还没有获过奖
                win.push_back(query);
                mp[query]=;
                i+=step;
            }else{
                i++;
            }
        }
        for(auto it:win)//可以用C++11,方便
            cout<<it<<'\n';
    }
    ;
}

1124 Raffle for Weibo Followers的更多相关文章

  1. PAT 1124 Raffle for Weibo Followers

    1124 Raffle for Weibo Followers (20 分)   John got a full mark on PAT. He was so happy that he decide ...

  2. 1124 Raffle for Weibo Followers (20 分)

    1124 Raffle for Weibo Followers (20 分) John got a full mark on PAT. He was so happy that he decided ...

  3. PAT甲级 1124. Raffle for Weibo Followers (20)

    1124. Raffle for Weibo Followers (20) 时间限制 400 ms 内存限制 65536 kB 代码长度限制 16000 B 判题程序 Standard 作者 CHEN ...

  4. 1124 Raffle for Weibo Followers[简单]

    1124 Raffle for Weibo Followers(20 分) John got a full mark on PAT. He was so happy that he decided t ...

  5. pat 1124 Raffle for Weibo Followers(20 分)

    1124 Raffle for Weibo Followers(20 分) John got a full mark on PAT. He was so happy that he decided t ...

  6. PAT甲级:1124 Raffle for Weibo Followers (20分)

    PAT甲级:1124 Raffle for Weibo Followers (20分) 题干 John got a full mark on PAT. He was so happy that he ...

  7. PAT1124:Raffle for Weibo Followers

    1124. Raffle for Weibo Followers (20) 时间限制 400 ms 内存限制 65536 kB 代码长度限制 16000 B 判题程序 Standard 作者 CHEN ...

  8. PAT_A1124#Raffle for Weibo Followers

    Source: PAT A1124 Raffle for Weibo Followers (20 分) Description: John got a full mark on PAT. He was ...

  9. A1124. Raffle for Weibo Followers

    John got a full mark on PAT. He was so happy that he decided to hold a raffle(抽奖) for his followers ...

随机推荐

  1. css属性(冷用法)

    1.pointer-events:none 元素永远不会成为鼠标事件的target. 2.not-allowed  禁止 3.-webkit-appearance: none; appearance ...

  2. python学习笔记(pict+requests+xml)

    博主尝试了下更换python版本 之前很多脚本改正运行错误后.还是不能正常运行 忙会了半天还是没有成功 只好还原版本 所以下面的代码还没实际运行成功.先记录下 #!/usr/bin/env pytho ...

  3. delete 与 delete []的区别

    一. 针对类class,这两种方式的效果是不同的. 当你通过下列方式分配一个类对象数组:   class A   {   private:      char *m_cBuffer;      int ...

  4. 【pat-1074】宇宙无敌加法器(高精度)

    链接:https://www.patest.cn/contests/pat-b-practise/1074 地球人习惯使用十进制数,并且默认一个数字的每一位都是十进制的.而在PAT星人开挂的世界里,每 ...

  5. win8 商店应用 设计风格原则

    共八条: 1,突出内容(数据). a,仅在屏幕上保留最相关的元素:移除线条.框和不必要的图形效果:限制屏幕上持久显示的导航框,如选项卡. b,交互尽量直接在内容上,直接控制内容来完成操作,而不是使用控 ...

  6. LeetCode OJ:Word Search(单词查找)

    Given a 2D board and a word, find if the word exists in the grid. The word can be constructed from l ...

  7. 几种常见排序算法的C++描述

    基本的排序算法有如下特点: 1.几种容易的算法都是以O(N2)排序的 2.Shell排序编程简单,其也是以O(N2)排序的,在实践中用的很多 3.复杂的排序算法往往都是按照O(NlogN)尽心排序的 ...

  8. 2017.11.7 Python 制作EFM32/ AVR批量烧录工具

    Customer need program quickly asap. ok,I need to set up a table for test. 1 reference data http://ww ...

  9. 转: Photon 3.4 Changed Logs ..

    最新版了.修了很多bug. Photon 3.4 http://doc.exitgames.com/en/onpremise/current/reference/version-history/pho ...

  10. (十七)js bom/dom

    window 是所有BOM中所有对象的核心. window 的属性 window.self代表自己本身,相当于window. eg: console.log(window.self === windo ...