#include<stdio.h> #include<string.h> typedef struct{ char name[100]; int h; int m; }Boy; int main() { int n; scanf("%d",&n); Boy boy[n]; int j; for(int i=0;i<n;i++) { scanf("%s %d %d",&boy[i].name,&boy[i].h,&boy[i].m); if(strcmp(boy[i].name,"Suxiao")==0) j=i; } int he=0,mo=0; for(int i=0;i<n;i++) { if(boy[j].h>boy[i].h) he++; if(boy[j].m>boy[i].m) mo++; } if(he>mo) printf("HEIGHT"); else if(he==mo) printf("EQ"); else printf("Money"); return 0; } |
Double click to view unformatted code.