#include<stdio.h> #include<string.h> struct stu{ char str[20]; int h; int m; }suu; int main() { int n,i,max,max1,m=0,s=0; scanf("%d",&n); struct stu suu[1000]; for(i=0;i<n;i++) { scanf("%s %d %d",&suu[i].str,&suu[i].h,&suu[i].m); if(strcmp(suu[i].str,"Suxiao") == 0) { max = suu[i].h; max1 = suu[i].m; } } for(i=0;i<n;i++) { if(max<suu[i].h) s++; } for(i=0;i<n;i++) { if(max1<suu[i].m) m++; } if(s==m) { printf("EQ\n"); } else if(s>m) { printf("MONEY\n"); } else printf("HEIGHT\n"); } |
Double click to view unformatted code.