469A - I Wanna Be the Guy Codeforces || Codeforces 469A - I Wanna Be the Guy Solution

Problem Name: 469A I Wanna Be the Guy
Judge: Codeforces
Problem link: 469A I Wanna Be the Guy



Codeforces 469A - I Wanna Be the Guy Solution in C++/Cpp

#include <bits/stdc++.h>

using namespace std;

int main()
{
    int array[250];
    int n, p, q;
    cin >> n >> p;
    int count = 0;

    for  (int i =  0 ; i < p ; i++)
    {
        cin >> array[i];
    }
    cin >> q;
    for (int i = p ; i < p + q ; i++)
    {
        cin >> array[i];
    }

    sort (array, array + (p + q));

    for (int i = 0 ; i < p+q ; i++)
    {
        if (array[i] != array[i+1])
        {
            count++;
        }
    }

    if (n == (count))
    {
        cout << "I become the guy." << endl;
    }
    else
    {
        cout << "Oh, my keyboard!" << endl;
    }

    return 0;
}








Tags: Codeforces 469A - I Wanna Be the Guy solution in C C++, 469A codeforces solution in C C++, Codeforces 469A solution in C C++, Codeforces I Wanna Be the Guy solution in C C++, 469A - I Wanna Be the Guy Codeforces solution in C C++, Codeforces 469A - I Wanna Be the Guy solution in C C++

Next Post Previous Post
No Comment
Add Comment
comment url