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; }
相关文章推荐
- VMware的安装
- uboot 移植遇到的问题及解决方法(转)
- eclipse aidl.exe error while creating directories
- leetcode 65. Valid Number
- rsync数据备份(二)--RHEL6.5
- 智能计算/计算智能、仿生算法、启发式算法的区别与关系?
- 解决Win10下Android Studio terminal无法输入的问题
- ios多线程操作(十二)—— 自定义NSOperation实现网络下载后回调
- ios多线程操作(十一)—— NSOperation的高级操作
- 一个Java音乐播放器
- CI 笔记2,(命令规范等)
- 人月神话阅读笔记01
- MySql中Blob与Text的区别
- 【Unity】6.2 在VS2015中调试 C# 脚本
- 使用ViewPager动画来做出不一样的引导页
- C++中如何重载<<
- 修改wordpress地址(URL)导致不能登录后台
- const和#define的区别
- 5.3 一致性
- 【GCJ2016】 round 1A