codeforces A – I Wanna Be the Guy wrong answer in testcase 27

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:

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)
    if(s.size() == n)
        cout << "I become the guy." << endl;
        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.

>Solution :

The first number in each of lines 2 and 3 is the count of following levels. It is not actually a level. So:

  • "1 2" means there is one level and that level is 2
  • "2 2 3" means there are two levels and those levels are 2 and 3

Consequently, no player passes level 1 and you should output "Oh, my keyboard!"

Leave a Reply