#include <stdio.h> #include <string.h> #include <math.h> struct stu{ char name[20]; int height; int money; }; int main() { struct stu s[1000]; int i,n; int h,m,H=0,M=0; scanf("%d",&n); for(i=0;i<n;i++) { scanf("%s%d%d",&s[i].name,&s[i].height,&s[i].money); if(strcmp(s[i].name,"Suxiao")==0) { h=s[i].height; m=s[i].money; } } for(i=0;i<n;i++) { if(h<s[i].height) H++; if(m<s[i].money) 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.