Codeforces 469A

#include <stdio.h>
#include <string.h>
#include <stdlib.h>
 
#define Maxsize 110
 
int comp_inc(const void *first, const void *second);
 
int main()
{
	int Lx[Maxsize];
	int Ly[Maxsize];
	int ans[Maxsize];
	memset(ans, 0, sizeof(ans));
	int n;
	int a, b;
	int Count=0;
	scanf("%d", &n);
	scanf("%d", &a);
	int i;
	for(i=0; i<a; ++i)
	{
		scanf("%d", &Lx[i]);
	}
	scanf("%d", &b);
	for(i=0; i<b; ++i)
	{
		scanf("%d", &Ly[i]);
	}
	qsort(Lx, a, sizeof(Lx[0]), comp_inc);
	qsort(Ly, b, sizeof(Ly[0]), comp_inc);
	for(i=0; i<a; ++i)
	{
		ans[Lx[i]]=Lx[i];
	}
	Count=a;
	for(i=0; i<b; ++i)
	{
		if(ans[Ly[i]]==0)
		{
			ans[Ly[i]]=Ly[i];
			++Count;
		}
	}
	if(Count==n)
		printf("I become the guy.\n");
	else
 
		printf("Oh, my keyboard!\n");
	return 0;
}
 
int comp_inc(const void *first, const void *second)
{
	return *(int *)first-*(int *)second;
}

  

上一篇:顺序栈的实现


下一篇:Could not find the Qt platform plugin windows错误解决方法