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