#include<stdio.h> #include <string.h> #include <math.h> struct student{ char name[100]; int h; int m; }s[1000]; int main(){ int n; int i,nh,nm,hi,mo; 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){ hi=s[i].h; mo=s[i].m; } } nh=0; nm=0; for(i=0;i<n;i++){ if(s[i].h>hi){ nh++; } if(s[i].m>mo){ nm++; } } if(nh<nm) printf("HEIGHT\n"); else if(nh>nm) printf("MONEY\n"); else printf("EQ\n"); return 0; } |
Double click to view unformatted code.