A9606 | I Wanna Be the Guy
时间限制1s
内存限制256MB
通过 / 提交0/0
题目描述
There is a game called "I Wanna Be the Guy", consisting of $n$ levels. Little X and his friend Little Y are addicted to the game. Each of them wants to pass the whole game.
Little X can pass only $p$ levels of the game. And Little Y can pass only $q$ levels of the game. You are given the indices of levels Little X can pass and the indices of levels Little Y can pass. Will Little X and Little Y pass the whole game, if they cooperate each other?
Little X can pass only $p$ levels of the game. And Little Y can pass only $q$ levels of the game. You are given the indices of levels Little X can pass and the indices of levels Little Y can pass. Will Little X and Little Y pass the whole game, if they cooperate each other?
输入格式
The first line contains a single integer $n$ ( $1<=n<=100$ ).
The next line contains an integer $p$ $(0<=p<=n)$ at first, then follows $p$ distinct integers $a_{1},a_{2},...,a_{p}$ $(1<=a_{i}<=n)$ . These integers denote the indices of levels Little X can pass. The next line contains the levels Little Y can pass in the same format. It's assumed that levels are numbered from 1 to $n$ .
The next line contains an integer $p$ $(0<=p<=n)$ at first, then follows $p$ distinct integers $a_{1},a_{2},...,a_{p}$ $(1<=a_{i}<=n)$ . These integers denote the indices of levels Little X can pass. The next line contains the levels Little Y can pass in the same format. It's assumed that levels are numbered from 1 to $n$ .
输出格式
If they can pass all the levels, print "I become the guy.". If it's impossible, print "Oh, my keyboard!" (without the quotes).
输入输出样例
输入 #1
4 3 1 2 3 2 2 4
输出 #1
I become the guy.
输入 #2
4 3 1 2 3 2 2 3
输出 #2
Oh, my keyboard!
In the first sample, Little X can pass levels \[1 2 3\], and Little Y can pass level \[2 4\], so they can pass all the levels both.
In the second sample, no one can pass level 4.
In the second sample, no one can pass level 4.
C++ 编辑器
输入
输出
可保存默认模板;新题优先使用已保存模板。
当前快捷键仅展示,暂不支持修改。
- 撤销
Ctrl / ⌘ + Z - 重做
Ctrl / ⌘ + Y - 查找
Ctrl / ⌘ + F - 全选
Ctrl / ⌘ + A - 复制
Ctrl / ⌘ + C - 剪切
Ctrl / ⌘ + X - 粘贴
Ctrl / ⌘ + V - 自动排版
工具栏排版按钮 - 草稿保存
编辑时自动保存到本机
历史
提交记录
状态说明时间源码
AI
作答助手
你好,我是作答助手。可以问思路、复杂度、样例含义或代码报错原因;不会直接给出完整 AC 代码。
确定要清空代码吗?
提交通过
评测结果:Accepted