水题水坑,虐心到哭
来源:互联网 发布:淘宝保证金怎么解冻 编辑:程序博客网 时间:2024/05/17 09:37
今天下午参加一场训练比赛,碰到一没话说的题目,本以为这是我会做的,想想本以为自己会做,结果,唉 一言难尽。突然发现今天好累但是正因为我学的累,才有挑战的动力,加油晚安。
题目如下
You are given n integers. Your task is very easy. You should find the maximum integera and the minimum integer b among these n integers. And then you should replace botha and b with a-b. Your task will not be finished unless all the integers are equal.
Now the problem come, you want to know whether you can finish you task. And if you can finish the task, you want to know the final result.
Input
The first line of the input contain an integer T(T≤ 20) indicates the number of test cases.
Then T cases come. Each case consists of two lines. The first line is an integern(2≤ n≤ 10) as the problem described. The second line containsn integers, all of them are no less than -100000 and no more than 100000.
Output
For each case you should print one line. If you can finish your task, you should print one of then integers. Otherwise, you should print "Nooooooo!"(without quotes).
Sample Input
231 2 325 5
Sample Output
25
一目了然的解决方法,先贴上自己能完美输出样例,结果一直都是wa
这只有机会在解决了,
现在附上一个正确的
同时在网上我找到一个奇葩题解,复杂到新手完全看不懂
- 水题水坑,虐心到哭
- ZCMU 1486: 掰巧克力(签到题) <水坑水坑!!!!>
- 粗心的物理学家 FZU-1058 (水坑题)
- [twitter] 墙之间的水坑能够装多少水
- hdu 1198 dfs(还是水坑变型题)农田灌溉
- POJ2386(水坑)
- POJ2386(水坑)
- POJ 2386 水坑 w连起来的为一个水坑
- 《我的twitter技术面试失败》中墙之间水坑装水问题的更烂解法(Java解)
- poj 2386 dfs(水坑数)
- 小蜗牛趴在妈妈背上过水坑
- [其他] 网络钓鱼与水坑攻击
- 1131 买水果【排列组合】大水坑!!
- 栈匹配法求水坑面积
- POJ 2386 Lake Counting(水坑计数)
- hdu 1241 dfs 类似于(POJ水坑数)
- 黑客攻击方式之水坑攻击和URL跳转漏洞
- 百度之星2015 资格赛 IP聚合【水坑】
- 【MATLAB】一维搜索之牛顿法
- HDU 1505 City Game
- eclipse web项目的部署方法
- 细说Linux网络配置(下)
- vim使用
- 水题水坑,虐心到哭
- Oracle job procedure 存储过程定时任务
- SSL链接相关文章
- 【MATLAB】一维搜索之抛物线法
- jQuery-添加、移出事件
- HashMap笔记
- 要熟记
- Effective Java - 第45条:将局部变量的作用域最小化
- 【MATLAB】一维搜索之平分法