I am practicing problem solving by solving on Codeforces, but in problem "A-I Wanna Be the Guy". Here is the link for the problem.
My code gets rejected at testcase 27 which has input:
3
1 2
2 2 3
Here is my code:
#include <bits/stdc++.h>
using namespace std;
int main()
{
int n, x;
cin >> n;
set <int> s;
while(cin >> x)
{
if(x != 0)
s.insert(x);
}
if(s.size() == n)
cout << "I become the guy." << endl;
else
cout << "Oh, my keyboard!" << endl;
return 0;
}
My output is I become the guy.
, but the answer is Oh, my keyboard!
.
To be honest, I am not sure why this testcase should give this output. If someone can take a look at the problem and help me, I would be grateful.