1124. Raffle for Weibo Followers (20)
来源:互联网 发布:买个域名多少钱 编辑:程序博客网 时间:2024/06/08 02:14
1124. Raffle for Weibo Followers (20)
#include <iostream>#include <vector>#include <algorithm>#include <string>#include <map>using namespace std;int main(){ int m,n,s; vector<string> v; map<string,int> check; cin>>m>>n>>s; for(int i=1;i<=m;++i) { string str; cin>>str; v.push_back(str); check[str]=0; } if(v.size()<(unsigned int)s) { cout<<"Keep going..."<<endl; } else { while(s<=m) { if(check[v[s-1]]==0) { check[v[s-1]]=1; cout<<v[s-1]<<endl; } else { while(s<=m&&check[v[s-1]]==1) ++s; if(s>m) break; else { check[v[s-1]]=1; cout<<v[s-1]<<endl; } } s+=n; } } return 0;}
阅读全文
0 0
- 1124. Raffle for Weibo Followers (20)
- PAT 1124. Raffle for Weibo Followers (20)
- PAT_A 1124. Raffle for Weibo Followers (20)
- 1124. Raffle for Weibo Followers (20)
- 1124. Raffle for Weibo Followers (20)
- 1124. Raffle for Weibo Followers (20)
- 1124. Raffle for Weibo Followers (20) 模拟
- 1124. Raffle for Weibo Followers (20)
- 1124. Raffle for Weibo Followers (20)
- PAT:1124. Raffle for Weibo Followers (20)
- Raffle for Weibo Followers
- Raffle for Weibo Followers
- PAT (Advanced Level) 1124. Raffle for Weibo Followers (20)
- 1124. Raffle for Weibo Followers (20)-PAT甲级真题
- 1124. Raffle for Weibo Followers (20)[数学逻辑题]
- PAT甲级 1124. Raffle for Weibo Followers (20)
- 【PAT】【Advanced Level】1124. Raffle for Weibo Followers (20)
- PAT 甲级 1124. Raffle for Weibo Followers (20)
- Nancy基于JwtBearer认证的使用与实现
- 图的表示(邻接矩阵和邻接表)
- Vue---使用vuex
- 融合SignalR的OPCClient实现环境参数实时监测
- 【bzoj3831】[Poi2014]Little Bird(单调队列优化dp)
- 1124. Raffle for Weibo Followers (20)
- Java类生命周期
- 按键消抖法1:debounce1
- 线性代数 -- 矩阵空间、秩1矩阵、小世界图
- jQuery取id的值的方法
- java.lang.NoSuchMethodException: cn.cust.struts.action.DemoAction.index()
- 算法提高 12-1三角形
- Argus
- html5到底多了什么?