Codeforces 469A I Wanna Be the Guy(水题)
2014-09-24 20:18
429 查看
题目链接:Codeforces 469A I Wanna Be the Guy
题目大意:两个人进行闯关游戏,给定A和B能通过的关卡,问说两人一起是否可以通过所有的关卡。
解题思路:水题。
题目大意:两个人进行闯关游戏,给定A和B能通过的关卡,问说两人一起是否可以通过所有的关卡。
解题思路:水题。
#include <cstdio> #include <cstring> #include <algorithm> using namespace std; const int maxn = 105; int main () { int n, m, x, c[maxn]; memset(c, 0, sizeof(c)); scanf("%d", &n); for (int i = 0; i < 2; i++) { scanf("%d", &m); for (int j = 0; j < m; j++) { scanf("%d", &x); c[x]++; } } int flag = true; for (int i = 1; i <= n; i++) if (c[i] == 0) { flag = false; break; } printf("%s\n", flag ? "I become the guy." : "Oh, my keyboard!"); return 0; }
相关文章推荐
- 【CodeForces】A. I Wanna Be the Guy
- Codeforces 469A - I Wanna Be the Guy (这俩方法都很好)
- A. I Wanna Be the Guy
- 469A - I Wanna Be the Guy
- CodeForces 3A Shortest path of the king(水题)
- 【codeforces 782B】The Meeting Place Cannot Be Changed(二分)
- 【codeforces】A. The Text Splitting(思维题-水题)
- 【Codeforces 782 B The Meeting Place Cannot Be Changed】+ 二分
- CodeForces 439B Devu, the Dumb Guy
- 【codeforces 782B】The Meeting Place Cannot Be Changed(二分)
- 【codeforces 782B】The Meeting Place Cannot Be Changed(二分)
- ACM刷题之Codeforces ————The Meeting Place Cannot Be Changed
- 【codeforces 782B】The Meeting Place Cannot Be Changed(二分)
- 【codeforces 782B】The Meeting Place Cannot Be Changed(二分)
- 【codeforces 782B】The Meeting Place Cannot Be Changed(二分)
- I don't wanna be in the dark!
- 【codeforces 782B】The Meeting Place Cannot Be Changed(二分)
- Codeforces 439B Devu, the Dumb Guy
- Codeforces 439 B. Devu, the Dumb Guy
- CodeForces 439B Devu, the Dumb Guy