#include<stdio.h> #include<string.h> int main(){ struct geren{ char name[30]; int height; int money; }; struct geren x[1000]; int n,k,hr=1,mr=1; char temp[]="Suxiao"; scanf("%d",&n); for(int i=0;i<n;i++){ scanf("%s %d %d",x[i].name,&x[i].height,&x[i].money); getchar(); } for(int j=0;j<n;j++){ if(strcmp(x[j].name,temp)==0){ k=j; } } for(int l=0;l<n;l++){ if(x[l].height>x[k].height){ hr++; } if(x[l].money>x[k].money){ mr++; } } if(hr<mr){ printf("HEIGHT"); } else if(hr>mr){ printf("MONEY"); } else{ printf("EQ"); } return 0; } |
Double click to view unformatted code.