题目描述:http://codeforces.com/problemset/problem/469/A
469A. I Wanna Be the Guy
time limit per test1 second
memory limit per test256 megabytes
inputstandard input
outputstandard output
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?
Input
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.
Output
If they can pass all the levels, print “I become the guy.”. If it’s impossible, print “Oh, my keyboard!” (without the quotes).
Examples
Input
Copy
4
3 1 2 3
2 2 4
Output
Copy
I become the guy.
Input
4
3 1 2 3
2 2 3
Output
Oh, my keyboard!
Note
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.
#include<iostream>
#include<set>
using namespace std;
int main()
{
set<int>m;
int n;
cin >> n;
int a, b, h, k;
cin >> a;
for (int i = 0; i < a; i++)
{
cin >> h;
m.insert(h);//将h插入m中
}
cin >> b;
for (int i = 0; i < b; i++)
{
cin >> k;
m.insert(k);//将k插入m中
}
/*set<int>::iterator it;
for(it=m.begin();it!=m.end();it++)
cout<<*it<<endl;
cout<<m.size()<<endl;*/
if (m.size() < n)
cout << "Oh, my keyboard!";
else
cout << "I become the guy.";
}