记录已解决的问题数即可,注意不重复计数。
#include <iostream>
#include <string>
#include <cstdio>
#include <algorithm>
#define MAX 105
#define INF 0x3f3f3f3f
using namespace std;
bool a[MAX];
int main() {
freopen("a.txt", "r", stdin);
freopen("b.txt", "w", stdout);
int n, p, x, c = 0;
cin >> n;
cin >> p;
for (int i = 1; i <= p; ++i) {
cin >> x;
if (!a[x]) {
a[x] = true;
c++;
}
}
cin >> p;
for (int i = 1; i <= p; ++i) {
cin >> x;
if (!a[x]) {
a[x] = true;
c++;
}
}
if (c == n) cout << "I become the guy." << endl;
else cout << "Oh, my keyboard!" << endl;
return 0;
}