#include<stdio.h> #include<string.h> void main() { char name[] = "Suxiao"; char str[100]; int n, index; int height[1000]; int money[1000]; int h=1, m=1; scanf("%d", &n); for (int i = 0; i < n; i++) { scanf("%s", str); scanf("%d %d", &height[i], &money[i]); if (strcmp(name, str) == 0) { index = i; } } for (int i = 0; i < n; i++) { if (height[i] > height[index]) { h++; } if (money[i]>money[index]) { m++; } } if (h<m) { printf("HEIGHT\n"); } else if(h>m) { printf("MONEY\n"); } else { printf("EQ\n"); } } |
Double click to view unformatted code.