Max Num

Time Limit: 1000/1000 MS (Java/Others)    Memory Limit: 32768/32768 K (Java/Others)
Total Submission(s): 16818    Accepted Submission(s): 10381

Problem Description
There are some students in a class, Can you help teacher find the highest student .
 
Input
There are some cases. The first line contains an integer t, indicate the cases; Each case have an integer n ( 1 ≤ n ≤ 100 ) , followed n students’ height.
 
Output
For each case output the highest height, the height to two decimal plases;
 
Sample Input
2
3 170.00 165.00 180.00
4 165.00 182.00 172.00 160.00
 
Sample Output
180.00
182.00
 #include<stdio.h>
int main()
{
int n,a,i,j;
double s[],max;
scanf("%d",&n);
while(n--)
{
scanf("%d",&a);
for(i=;i<a;i++)
scanf("%lf",&s[i]);
max=s[];
for(i=;i<a;i++)
max=max>s[i]?max:s[i];
printf("%.2lf\n",max);
}
return ;
}

Max Num---hdu2071的更多相关文章

  1. JSU省赛队员选拔赛个人赛1(Coin Change、Fibbonacci Number、Max Num、单词数、无限的路、叠筐)

    JSU省赛队员选拔赛个人赛1 一.题目概述: A.Coin Change(暴力求解.动态规划)     B.Fibbonacci Number(递推求解) C.Max Num(排序.比较) D.单词数 ...

  2. HDOJ 2071 Max Num

    Problem Description There are some students in a class, Can you help teacher find the highest studen ...

  3. Max Num

    Problem Description There are some students in a class, Can you help teacher find the highest studen ...

  4. HDU 2071 Max Num

    http://acm.hdu.edu.cn/showproblem.php?pid=2071 Problem Description There are some students in a clas ...

  5. HDOJ-1003 Max Sum(最大连续子段 动态规划)

    http://acm.hdu.edu.cn/showproblem.php?pid=1003 给出一个包含n个数字的序列{a1,a2,..,ai,..,an},-1000<=ai<=100 ...

  6. [ACM] hdu 1003 Max Sum(最大子段和模型)

    Max Sum Time Limit: 2000/1000 MS (Java/Others)    Memory Limit: 65536/32768 K (Java/Others) Total Su ...

  7. Max Chunks To Make Sorted II LT768

    This question is the same as "Max Chunks to Make Sorted" except the integers of the given ...

  8. Max Chunks To Make Sorted LT769

    Given an array arr that is a permutation of [0, 1, ..., arr.length - 1], we split the array into som ...

  9. 判定一个数num是否为x的幂

    那个数所在类型中,x的幂最大值为max 1.则第一条判定:max%num==0: 若x不为任何数的幂,则第一条判定足矣. 若x为某个数的幂,则要加判定条件 2.(num-1)%(x-1)==0 同时满 ...

随机推荐

  1. javascript统计输入文本的简易方法

    计算文本框的输入字符数的简易方法: ]; var tValue = text.value; num = Math.ceil(getLength(tValue)/); //正则:用于区分中文为两个字节 ...

  2. linux ar 命令的使用说明那个和例子[转]

    用途说明 创建静态库.a文件.用C/C++开发程序时经常用到,但我很少单独在命令行中使用ar命令,一般写在makefile中,有时也会在shell脚 本中用到.关于Linux下的库文件.静态库.动态库 ...

  3. 几个makefile小例子

    http://www.blogjava.net/canvas/articles/quick_makefile.html http://www.cnblogs.com/azraelly/archive/ ...

  4. python 在linux下通过top,和dh命令获得cpu,内存,以及硬盘信息

    主要是通过os.popen读取命令输出实现的,os.popen启动新的进程,且将外部命令的输出作为文件类型对象返回.不能获得外部命令的返回值.既然是文件对象就可以直接用for in 来读取,代码如下: ...

  5. log4net使用(包括单个文件和按日期生成多个文件)

    1.log4net生成单个文件 直接将这段代码考到config中即可用 <log4net> <!--定义输出到文件中--> <appender name="Lo ...

  6. showModalDialog(转)

    基本介绍:          showModalDialog()         (IE 4+ 支持)          showModelessDialog()      (IE 5+ 支持)    ...

  7. Mac OSX下面的博客客户端Marsedit使用

       在windows下面,有一个很好用的博客客户端,叫做windows live writer,不得不感叹,其所见即所得的方面真的是很方便,特别是还可以方便的把word上的内容直接帖上去,包括文件中 ...

  8. 玩sdr的朋友们,在rtl_tcp时,记得调整rtl_AGC和tuner_AGC啊

    我在rtl_tcp时没有调整这个,结果怎么也听不到声音啊 还有就是在搞rtl_tcp时,一定要网速跟得上,我用无线网络时就碰到了这个问题,声音总是一直断续着,郁闷死

  9. C# 新特性_协变与逆变 (.net 4.0)

    C#4.0中有一个新特性:协变与逆变.可能很多人在开发过程中不常用到,但是深入的了解他们,肯定是有好处的. 协变和逆变体现在泛型的接口和委托上面,也就是对泛型参数的声明,可以声明为协变,或者逆变.什么 ...

  10. Qt编程之QtScript

    需求是这样的: 需要给一个硬件接口测试些东西,用js来调用,js做成不同的独立模块分别测试不同的硬件接口,包括DMD内存,PCIE带宽等等.需要用一个exe来载入这些js文件分别调用测试模块.exe用 ...