#include<stdio.h> typedef struct { char name[20]; int height; int monye; }stu; int main() { int n,i,j=0; int h,m,ch=0,cm=0; scanf("%d",&n); stu s[n]; for(int i=0;i<n;i++) { scanf("%s %d %d",&s[i].name,&s[i].height,&s[i].monye); } for(i=0;i<n;i++) { if(s[i].name=="Suxiao") {h=s[i].height; m=s[i].monye; } } for(i=0;i<n;i++) { if(h>s[i].height)ch++; if(m>s[i].monye)cm++; } if(ch>cm) printf("HIGHT"); if(ch<cm) printf("MONEY"); if(ch==cm) printf("EQ"); } |
Double click to view unformatted code.