您的位置:首页 > 其它

HDU 2071

2016-04-16 11:59 218 查看
/*
@问题:最高身高
@Time:20160412-21:29
@Author:Alex
*/
#include <stdio.h>
#include <stdlib.h>
//#define ext_input
int main()
{
int t=0;
int n=0;
int count;
double Max_height = 0;
double * string = NULL;
#ifdef ext_input
freopen("2071.txt","r",stdin);
freopen("out.txt","w",stdout);
#endif
while(scanf("%d",&t) != EOF)
{
while(t--)
{
scanf("%d",&n);
string = (double *)malloc(n*sizeof(double));
if(NULL == string)
{
exit(1);
}
for(count =0;count<n;count++)
{
scanf("%lf",string+count);
}
Max_height = *string;
for(count=0;count<n count="" if="" string="" count="">Max_height)
{
Max_height = *(string+count);
}
}
printf("%.2lf\n",Max_height);
free(string);
}
#ifdef ext_input
fclose(stdout);
fclose(stdin);
#endif
}
return 0;
}
内容来自用户分享和网络整理,不保证内容的准确性,如有侵权内容,可联系管理员处理 点击这里给我发消息
标签: