1069. 微博转发抽奖(20)
2017-10-15 20:02
288 查看
水题。
自己做的输出标记提交的时候竟然忘记去除,浪费了一次递交的机会。
唉。
自己做的输出标记提交的时候竟然忘记去除,浪费了一次递交的机会。
唉。
// 2017/10/14 NCU // PAT-B 1070 // scienceZ #include <cstdio> #include <set> #include <string> #include <iostream> #include <algorithm> using namespace std; int m, n, s; char arr[1005][30]; set<string> bi; int main() { cin >> m >> n >> s; for (int i = 1; i <= m; i++) cin >> arr[i]; for(int i = s; i<=m; ){ if(bi.count(arr[i]) == 1) { i++; continue; }else{ cout << arr[i] << endl; bi.insert(arr[i]); i+=n; } } if (bi.size() == 0) cout << "Keep going..." << endl; return 0; }
相关文章推荐
- 1069. 微博转发抽奖(20)
- 1069. 微博转发抽奖(20)
- 1069. 微博转发抽奖(20)
- 1069. 微博转发抽奖(20)
- 1069. 微博转发抽奖(20)
- PAT Basic 1069. 微博转发抽奖(20)
- 1069. 微博转发抽奖(20)
- 1069. 微博转发抽奖(20)
- 1069. 微博转发抽奖(20)
- PAT 1069. 微博转发抽奖(20)
- 1069. 微博转发抽奖(20)
- 1069. 微博转发抽奖(20)
- 1069. 微博转发抽奖(20) PAT乙级真题
- 1069. 微博转发抽奖(20)
- 1069. 微博转发抽奖(20) PAT
- 1069. 微博转发抽奖(20)
- 1124. Raffle for Weibo Followers (20) PAT 甲级&&1069. 微博转发抽奖(20) PAT乙级
- 1069. 微博转发抽奖(20)
- 1069. 微博转发抽奖(20)
- PAT 1069. 微博转发抽奖(20)