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. Array类型(二)

    1.concat()方法可以基于当前数组中的所有项创建一个新数组. 先创建当前数组的一个副本,然后将接收到的参数添加到这个副本的末尾,最后返回新构建的数组. var colors = ["r ...

  2. gerrit升级到16.04之后连接不到服务器

    升级到ubuntu-16.04后,发现Git-review代码报错: Unable to negotiate with 10.140.110.77 port 29418: no matching ke ...

  3. WAMPSERVER2.2 无法启动的解决!

    转: PHP版本:5.3.10 XDEBG插件:php_xdebug-2.1.2-5.3-vc9.dll WAMPServer2.2用的是VC9编译的,并且需要VC9运行库支持. 此问题解决方法: 下 ...

  4. 关于tuple的只读特性

    a = (1,3,[5,4,1]) a[2][1] = 2 print(a) 结果是:(1,3,[5,2,1]) 可以看到,在这里tuple的内容被修改了. 原因就是tuple的“只读”属性是指tup ...

  5. Frogger(最短路)

    Frogger(poj2253) Time Limit: 1000MS   Memory Limit: 65536K Total Submissions: 31854   Accepted: 1026 ...

  6. 典型的DIV CSS三行二列居中高度自适应布局

    如何使整个页面内容居中,如何使高度适应内容自动伸缩.这是学习CSS布局最常见的问题.下面就给出一个实际的例子,并详细解释.(本文的经验和是蓝色理想论坛xpoint.guoshuang共同讨论得出的.) ...

  7. 【待整理】IOS开发之下载

    一.传统的下载文件的方式 - (void)downloaderWithUrl:(NSURL *)url { NSURLRequest *request = [NSURLRequest requestW ...

  8. FreeBSD 安装axel提高ports的安装速度

    ########################  FreeBSD安装Ports ######################## 1 # ee /etc/portsnap.conf 设置SERVER ...

  9. KEIL C51中const和code的使用

    code是KEIL C51 扩展的关键字,用code修饰的变量将会被放到CODE区里.但C语里的const关键字好像也有定义不能改变的变量的功能,这两个关键字有什么区别呢?在帮助手册里查找const, ...

  10. Windows7里的“计算器”你真的会用吗?

    “计算器”是不同Windows版本中的必备工具,虽然功能单一,但的确是人们日常工作中不可缺少的辅助工具,本文就来谈谈它的使用. 一.标准型和科学型两种面板 我们既可从Windows附件菜单中启动它,也 ...