水题一个,贴个代码吧。

#include <iostream>
#include <cstdio>
#include <algorithm>
#include <string.h>
#include <string>
#include <map> using namespace std;
const int maxn=;
map<string,int> maps;
int main()
{
int n,m,s;
string str;
scanf("%d %d %d",&m,&n,&s);
int cnt=;
if(m<s){
printf("Keep going...\n");
}
else{
for(int i=;i<s;i++)
cin>>str;
maps[str]=;
cout<<str<<endl;
for(int i=s;i<m;i++){
cin>>str;
cnt++;
if(cnt==n){
if(!maps[str]){
maps[str]=;
cnt=;
cout<<str<<endl;
}
else
cnt--;
}
} } return ;
}

PAT甲题题解-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. PAT甲级 1124. Raffle for Weibo Followers (20)

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

  3. 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 ...

  4. 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 ...

  5. 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 ...

  6. 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 ...

  7. PAT甲题题解-1012. The Best Rank (25)-排序水题

    排序,水题因为最后如果一个学生最好的排名有一样的,输出的课程有个优先级A>C>M>E那么按这个优先级顺序进行排序每次排序前先求当前课程的排名然后再与目前最好的排名比较.更新 至于查询 ...

  8. PAT甲题题解-1019. General Palindromic Number (20)-又是水题一枚

    n转化为b进制的格式,问你该格式是否为回文数字(即正着写和倒着写一样)输出Yes或者No并且输出该格式又是水题... #include <iostream> #include <cs ...

  9. PAT甲题题解-1062. Talent and Virtue (25)-排序水题

    水题,分组排序即可. #include <iostream> #include <cstdio> #include <algorithm> #include < ...

随机推荐

  1. [提权]域内提权神器 MS14-068 完整EXP

     可以让任何域内用户提升为域管理员     c:\python27\python.exe ms14-068.py -u k8test3@k8.local -p k8team!@# -s S-1-5-2 ...

  2. 【Python】新建自定义个数的自定义长度名字

    # -*- coding:utf-8 -*- import random def CreateRandomName(number,length): """ :param ...

  3. eclipse能正常启动tomcat,但是网页访问不了

    参考网址https://blog.csdn.net/did_itmyway/article/details/62099930

  4. Spark学习之路 (二十二)SparkStreaming的官方文档

    官网地址:http://spark.apache.org/docs/latest/streaming-programming-guide.html 一.简介 1.1 概述 Spark Streamin ...

  5. [转]VS2013+简单稀疏光束调整库SSBA配置(64位编译)

    有关SSBA库的资源比较少,我是在Github上搜索下载的,具体的GitHub官方下载地址为:SSBA 下载后在SSBA解压文件夹下新建文件夹build. 打开cmake gui,在source co ...

  6. C++之语言概述

    C++语言是广泛使用的程序设计语言之一,因其特有的优势在计算机应用领域占有重要一席. C语言的发展 20世纪70年代初,贝尔实验室的Dennis Richie 等人在B语言基础上开发出C语言,最初是作 ...

  7. Android MD5算法

    package com.example.myapi.md5; import java.io.UnsupportedEncodingException; import java.security.Mes ...

  8. A. Nephren gives a riddle

    What are you doing at the end of the world? Are you busy? Will you save us? Nephren is playing a gam ...

  9. OpenGL笔记(三) GLSL语法与内建函数

    GLSL,OpenGL Shading Language,GLSL中没有指针,并且没有任何类型的字符串或字符. (1)GLSL的修饰符与基本数据类型 const:用于声明非可写的编译时常量变量: at ...

  10. 添加mysqld、apache服务到windows服务

    mysqld --install   “d:\apache\bin\httpd.exe” -k install