#include <stdio.h>
#include <math.h>

typedef struct preson
{
    char name[20];
    int a;
    int b;
    int c;
}Person;

int main(void){
    int n;
    int y=0;
    int t=0;
    int se=0;
    int th=0;
    scanf("%d", &n);
	Person arr[n];
	int f=0;
	
	for(f=0; f<n+100; f++)
	{
	    scanf("%s %d %d %d", arr[f].name, &arr[f].a, &arr[f].b, &arr[f].c);
	}

    for(f=0; f<n; f++)
	{
	    if(arr[f].a > y)
        {
            y=arr[f].a;
            t=f;
        }
	}
    
    for(f=0; f<n; f++)
	{
	    if(arr[t].b < arr[f].b)
        {
            se++;
        }
	}
    for(f=0; f<n; f++)
	{
	    if(arr[t].c < arr[f].c)
        {
            th++;
        }
	}

    printf("%s %d %d", arr[t].name, se+1, th+1);
    
}




Embed on website

To embed this project on your website, copy the following code and paste it into your website's HTML: