#include <iostream>
#include<algorithm>
#include<stdlib.h>
#include<stdio.h>
#include<string.h>
#include<math.h>
using namespace std;
struct A{
char a[1100];
char b[1100];
}a[110];
int main()
{
int i,j,k,n,m,x,y,d,e,t;
char b[110],c[110];
while(scanf("%d %s",&n,b)!=EOF)
{x=0;
y=0;
for(i=0;i<n;i++)
{
scanf(" %s",c);
for(j=0;j<3;j++)
a[i].a[j]=c[j];
a[i].a[3]=0;
for(j=0;j<3;j++)
a[i].b[j]=c[j+5];
a[i].b[3]=0;
}
for(i=0;i<n;i++)
{if(strcmp(b,a[i].a)==0)
x++;
if(strcmp(b,a[i].b)==0)
y++;
}
if(x==y)
printf("home\n");
else
printf("contest\n");
}
return 0;
}
Neverending competitions
猜你喜欢
转载自blog.csdn.net/qq_41232172/article/details/79617099
今日推荐
周排行