题目链接:http://acm.hnu.cn/online/?action=problem&type=show&id=12826&courseid=268
1 #include<cstdio> 2 #include<cstring> 3 #include<iostream> 4 #include<algorithm> 5 using namespace std; 6 7 int main() 8 { 9 int T,n,x,y; 10 scanf("%d",&T); 11 while(T--) 12 { 13 scanf("%d%d%d",&n,&x,&y); 14 int f,e; 15 scanf("%d",&f); 16 for(int i = 1;i < n;++i) 17 scanf("%d",&e); 18 if(x == f && y != e) 19 puts("EASY"); 20 else if(x != f && y == e) 21 puts("HARD"); 22 else if(x == f && y == e) 23 puts("BOTH"); 24 else puts("OKAY"); 25 } 26 return 0; 27 }