Time Limit: 1 Second Memory Limit: 32768 KB
In the year 2008, the 29th Olympic Games will be held in Beijing. This will signify the prosperity of China and Beijing Olympics is to be a festival for people all over the world as well.
The motto of Olympic Games is “Citius, Altius, Fortius”, which means “Faster, Higher, Stronger”.
In this problem, there are some records in the Olympic Games. Your task is to find out which one is faster, which one is higher and which one is stronger.
Input
Faster
3
10 11 12
Higher
4
3 5 4 2
Stronger
2
200 200
Sample Output
10
5
200
#include
int max(int shu[],int n)
{
int m,i;
m=shu[0];
for (i=0;i
}
int min(int shu[],int n)
{
int m,i;
m=shu[0];
for (i=0;i
return m;
}
int main(int argc, char *argv[])
{
char s[][10]={“Faster”,”Higher”,”Stronger”};
char ch[10];
int i,shu[3000]={0},n,j,k,temp,t,T;
scanf (“%d”,&T);
for (t=0;t
scanf (“%s”,ch);
scanf (“%d”,&n);
for (j=0;j
scanf (“%d”,&shu[j]);
}
for (i=0;i<3;i++)
{
if (!strcmp(ch,s[i])) break;
}
if (i==0)
{
printf (“%d\n”,min(shu,n));
}
else
{
printf (“%d\n”,max(shu,n));
}
}
}