Max Num

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

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 <iostream>

using namespace std;

int main()
{
int t,count;
double score,max = -1;
cin >> t;
for (int i = 1; i <= t; i++)
{
cin >> count;
max = -1;
while (count--)
{
cin >> score;
max = max > score ? max : score;
}
printf("%.2lf\n", max);
}
}

hdoj:2071的更多相关文章

  1. 算法——A*——HDOJ:1813

    Escape from Tetris Time Limit: 12000/4000 MS (Java/Others)    Memory Limit: 32768/32768 K (Java/Othe ...

  2. hdoj:题目分类

    基础题: 1000.1001.1004.1005.1008.1012.1013.1014.1017.1019.1021.1028.1029.1032.1037.1040.1048.1056.1058. ...

  3. HDOJ:1533-Going Home(最小费用流)

    题目链接:http://acm.hdu.edu.cn/showproblem.php?pid=1533 解题心得: 第一次写最小费用流的题,去hdoj上找了一个入门级题目,建图比较简单,用了spfa和 ...

  4. hdoj:2086

    A1 = ? Time Limit: 5000/1000 MS (Java/Others)    Memory Limit: 32768/32768 K (Java/Others)Total Subm ...

  5. hdoj:2085

    核反应堆 Time Limit: 1000/1000 MS (Java/Others)    Memory Limit: 32768/32768 K (Java/Others)Total Submis ...

  6. hdoj:2084

    数塔 Time Limit: 1000/1000 MS (Java/Others)    Memory Limit: 32768/32768 K (Java/Others)Total Submissi ...

  7. HDOJ:6333-Problem B. Harvest of Apples(组合数学+莫队算法+逆元)

    题目链接:http://acm.hdu.edu.cn/showproblem.php?pid=6333 解题心得: 这个题可以说是十分精彩了,首先推组合数学的公式,其中一个很重要的公式是Cnm = C ...

  8. HDOJ:6356-Glad You Came(线段树剪枝)

    题目链接:http://acm.hdu.edu.cn/showproblem.php?pid=6356 解题心得: 现在深深的知道了算法复杂度的重要了,这个题算复杂度的时候还要把一些常数也算出来,不然 ...

  9. hdoj:2075

    A|B? Time Limit: 1000/1000 MS (Java/Others)    Memory Limit: 32768/32768 K (Java/Others)Total Submis ...

随机推荐

  1. python基础一 ------linux某目录下批量的为特定文件加入可执行权限

    需求: 一个文件夹中有个文件,要求对特定的文件加入可执行权限 某文件系统目录下有一系列文件:    quicksort    graph.py    heap.java    install.sh   ...

  2. 使用requests进行模拟登陆

    import re import requests header = { 'User-Agent': "Mozilla/5.0 (Windows NT 6.1; WOW64) AppleWe ...

  3. linux下 玩转ptrace

    译者序:在开发Hust Online Judge的过程中,查阅了不少资料,关于调试器技术的资料在网上是很少,即便是UNIX编程巨著<UNIX环境高级编程>中,相关内容也不多,直到我在 ht ...

  4. 三十分钟学完Vue

    基础知识: vue的生命周期: beforeCreate/created. beforeMount/mounted. beforeUpdate/updated. beforeDestory/desto ...

  5. 说一下Servlet里面得request和response

    当一个servlet被调用的时候,我们一般继承带协议的httpServlet,大方向上是下图这样 在这里面request和response起了什么作用呢? 来细究一下. request:1.封装了客户 ...

  6. (转)JavaWeb学习之Servlet(二)----Servlet的生命周期、继承结构、修改Servlet模板

    [声明] 欢迎转载,但请保留文章原始出处→_→ 文章来源:http://www.cnblogs.com/smyhvae/p/4140466.html 一.http协议回顾: 在上一篇文章中:JavaW ...

  7. [转]开源.net 混淆器ConfuserEx介绍

    今天给大家介绍一个开源.net混淆器——ConfuserEx http://yck1509.github.io/ConfuserEx/ 由于项目中要用到.net 混淆器,网上搜寻了很多款,比如Dotf ...

  8. 使用linux kernel代码编译perf工具

    环境:Qemu + ARMv8 perf是一款综合性分析工具,大到系统全局性性能,再小到进程线程级别,甚至到函数及汇编级别. 在内核源码目录下执行编译脚本: #!/bin/bash cross_com ...

  9. 【记】研究Sharding-JDBC遇到的一个异常(Caused by: io.shardingsphere.core.exception.ShardingException: Cannot get uniformed table structure for `t`. The different meta data of actual tables are as follows)

    一.异常信息 Caused by: io.shardingsphere.core.exception.ShardingException: Cannot get uniformed table str ...

  10. centos安装系统全过程

    --查看系统 lsb_release -a --查看端口 netstat -lnp|grep 80 ps 进程ID #查看进程的详细信息 kill -9 进程ID --查看Java 版本 java - ...