View Code of Problem 63

#include<stdio.h>
int main()
{
    int n,i,a,b,s[1000],t[1000],max=0,y,z;
    char x[20];
    scanf("%d",&n);
    for(i=0;i<n;i++)
    {
        scanf("%s%d%d",&x[i],&a,&b);
        s[i]=a;
        t[i]=b;
    }
    for(i=0;i<n;i++)
    {
        if(s[i]>s[max])
            s[max]=s[i];
        while(strcmp(x,"Suxiao")==0)
        {
            y=i;
        }
    }
    for(i=0;i<n;i++)
    {
        if(t[i]>t[max])
            t[max]=t[i];
        while(strcmp(x,"Suxiao")==0)
        {
            z=i;
        }
    }
    if(y<z)
        printf("HEIGHT");
    else if(y>z)
        printf("MONEY");
    else
        printf("EQ");
    return 0;
}

Double click to view unformatted code.


Back to problem 63