#include<stdio.h> #include <math.h> #include <string.h> #include <ctype.h> #include <math.h> #define Max 100 struct stu{ char name[20]; int h; int m; }; int main() { int i,n,h,m,H=0,M=0; struct stu s[1000]; scanf("%d",&n); for(i=0;i<n;i++) { scanf("%s%d%d",&s[i].name,&s[i].h,&s[i].m); if(strcmp(s[i].name,"Suxiao")==0) { h=s[i].h; m=s[i].m; } } for(i=0;i<n;i++) { if(h<s[i].h) H++; if(m<s[i].m) M++; } if(H==M) printf("EQ\n"); else if(H<M) printf("HEIGHT\n"); else printf("MONEY\n"); return 0; } |
Double click to view unformatted code.