#include<stdio.h> #include<string.h> #include<math.h> struct Boys { char name[100]; int height; int money; }; int main() { int n; int hy,my,t,i,j; hy=0;my=0; scanf("%d",&n); struct Boys boys[10000]; for(i=0;i<n;i++){ scanf("%s%d%d",boys[i].name,&boys[i].height,&boys[i].money); if(strcmp(boys[i].name,"Suxiao")==0) t=i; } for(j=0;j<n;j++){ if(t!=j){ if(boys[t].height>boys[j].height) hy++; if(boys[t].money>boys[j].money) my++; } } if(hy>my) printf("HEIGHT\n"); else if(hy<my) printf("MONRY\n"); else printf("EQ\n"); return 0; } |
Double click to view unformatted code.