水题一个,贴个代码吧。

#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. django模板系统(下)

    主要内容:母版,继承母版,块,组件,静态文件 母版 <!DOCTYPE html> <html lang="en"> <head> <me ...

  2. ELK 安装过程补充(不建议看,很少)

    1.yum 安装ELK服务 参考文档:https://blog.csdn.net/tonghudan/article/details/81414387 rpm -Uvh https://dl.fedo ...

  3. DevExpress11、TreeList

    一.简介 using System; using System.Collections.Generic; using System.ComponentModel; using System.Data; ...

  4. PyQt5--QCalendar

    # -*- coding:utf-8 -*- ''' Created on Sep 20, 2018 @author: SaShuangYiBing Comment: ''' import sys f ...

  5. 详解--从地址栏输入url到页面展现中间都发生了什么?

    这是一个综合性很强的问题,个人理解包含以下七个基本点: 1.在浏览器地址栏输入url并按下回车. 2.浏览器检查当前url是否存在缓存和缓存是否过期. 3.域名解析(DNS解析url对应的ip). 4 ...

  6. Oracle Spatial中SDO_Geometry说明

    Oracle Spatial中SDO_Geometry说明 在ArcGIS中通过SDE存储空间数据到Oracle中有多种存储方式,分别有:二进制Long Raw .ESRI的ST_Geometry以及 ...

  7. 20165302 程上杰 Exp2 后门原理与实践

    一,后门概念 后门就是不经过正常认证流程而访问系统的通道. 二,后门工具 1.netcat(nc.ncat) 是一个底层工具,进行基本的TCP UDP数据收发.常被与其他工具结合使用,起到后门的作用. ...

  8. OpenCV——ORB特征检测与匹配

    原文链接:https://mp.weixin.qq.com/s/S4b1OGjRWX1kktefyHAo8A #include <opencv2/opencv.hpp> #include ...

  9. JAVA框架 Spring JDBC模板

    一:引入jar包: 1.数据驱动jar包: dbcp依赖的包: spring的事务包和数据库包: IOC包AOP包.log4j的包: 所有的jar包: 编写测试类: 注入JdbcTemplate类,该 ...

  10. [SDOI2011]工作安排 BZOJ2245

    分析: 费用流裸题,按照题面要求建边就可以了,语文题,我读了10多分钟才知道这题干啥...特别是注意一个细节a[j+1]-a[j]... 附上代码: #include <cstdio> # ...