/* @问题:最高身高 @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; }