Sicily 2593 Begin the contest with a very easy problem (难得水题)
2012-05-07 17:23
417 查看
找最值。
#include <stdio.h> int main() { int te; int n; int min; int max; int t; scanf("%d", &te); while(te--) { scanf("%d", &n); scanf("%d", &t); min = t; max = t; n--; while(n--) { scanf("%d", &t); if(t > max) { max = t; } if(t < min) { min = t; } } printf("%d\n", max - min); } }
相关文章推荐
- The 9th UESTC Programming Contest Final——Easy Problem
- poj1298 The Hardest Problem Ever ——水题
- How to begin with the webpage making
- HDU-1032-The 3n + 1 problem(C++&学英语&水题)
- IIUC ONLINE CONTEST 2008 / UVa 11389 The Bus Driver Problem (贪心)
- The 6th Zhejiang Provincial Collegiate Programming Contest->ProblemB:Light Bulb
- [sicily]1157. The hardest problem
- Sicily 1157 the hardest problem
- windows 下git commit问题("error: There was a problem with the editor 'vi'")
- HDU 5373 The shortest problem(模拟)——2015 Multi-University Training Contest 7
- UESTC 87 Easy Problem With Numbers 线段树区间更新 逆元 分解质因数
- 2014-2015 ACM-ICPC, Asia Xian Regional Contest(G - The Problem to Slow Down You-回文树)
- 【ZOJ3932 The 16th Zhejiang University Programming ContestF】【水题】Handshakes 每人与之前认识的人握手 最大可能认识人数
- There was a problem communicating with the PayPal servers. Please try again
- POJ 1207 The 3n+1 problem(我的水题之路——输入输出要保持原有顺序)
- This problem will occur when running in 64 bit mode with the 32 bit Oracle client components installed.
- zoj-5707题 Very Happy Great BG (签到题)The 13th Zhejiang Provincial Collegiate Programming Contest
- 2014-2015 ACM-ICPC, Asia Xian Regional Contest GThe Problem to Slow Down You
- Sicily 1404. Hie with the Pie
- 2010-2011 ACM-ICPC, NEERC, Moscow Subregional Contest Problem J. Joke 水题