CF469A.I Wanna Be the Guy
入门
通过率:0%
时间限制:1.00s
内存限制:256MB
AC君温馨提醒
该题目为【codeforces】题库的题目,您提交的代码将被提交至codeforces进行远程评测,并由ACGO抓取测评结果后进行展示。由于远程测评的测评机由其他平台提供,我们无法保证该服务的稳定性,若提交后无反应,请等待一段时间后再进行重试。
题目描述
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?
有一款名为“I Wanna Be the Guy”的游戏,共包含 n 个关卡。小 X 和他的朋友小 Y 都沉迷于这款游戏,他们都希望通关整款游戏。
小 X 只能通过该游戏中的 p 个关卡,而小 Y 只能通过其中的 q 个关卡。现给出小 X 能通过的关卡编号以及小 Y 能通过的关卡编号。如果小 X 和小 Y 相互合作,他们能否共同通关整款游戏?
输入格式
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.
第一行包含一个整数 n(1≤n≤100)。
下一行首先包含一个整数 p(0≤p≤n),随后是 p 个互不相同的整数 a1,a2,…,ap(1≤ai≤n)。这些整数表示 Little X 能够通过的关卡编号。再下一行以相同格式给出 Little Y 能够通过的关卡。假设关卡编号为 1 到 n。
输出格式
If they can pass all the levels, print "I become the guy.". If it's impossible, print "Oh, my keyboard!" (without the quotes).
如果他们能通过所有关卡,则输出 “I become the guy.”;如果不可能,则输出 “Oh, my keyboard!”(不带引号)。
输入输出样例
输入#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.
在第一个样例中,小 X 可以通过关卡 [1\ 2\ 3],小 Y 可以通过关卡 [2\ 4],因此他们两人合起来可以通过所有关卡。
在第二个样例中,没有人能通过关卡 4。
输入解题思路,AI测评打分。不知道怎么写?