#include <stdio.h> #include <math.h> #include <string.h> int main(int argc, const char * argv[]) { int n; char name[1000][10]; int property[1000][2]; int money, height; int moneyTag = 0, heightTag = 0; scanf("%d", &n); for(int i = 0; i < n; i++) { scanf("%s %d %d", &name[i], &property[i][0], &property[i][1]); if(strcmp("Suxiao", name[i]) == 0) { height = property[i][0]; money = property[i][1]; } } for(int i = 0; i < n; i++) { if(property[i][0] < height) { heightTag++; } if(property[i][1] < money) { moneyTag++; } } if(moneyTag < heightTag) printf("HEIGHT\n"); else if(moneyTag > heightTag) printf("MONEY\n"); else printf("EQ\n"); return 0; } |
Double click to view unformatted code.