浙江科技学院第十三届程序设计竞赛 1008-A Heavy Rainy Day【贪心思维】
来源:互联网 发布:js上拉加载商品详情 编辑:程序博客网 时间:2024/04/27 19:36
A Heavy Rainy Day
Time Limit : 3000/1000ms (Java/Other) Memory Limit : 65535/32768K (Java/Other)
Total Submission(s) : 476 Accepted Submission(s) : 124
Font: Times New Roman | Verdana | Georgia
Font Size: ← →
Problem Description
As you know, Hangzhou always rains heavily, especially in Xiaoheshan area, which does annoy ACMers for a longer time. One day, N hardworking ACMers were playing League of Legends in the lab, of course not include me, while it was raining cats and dogs. Everyone wanted to come back to the department where they were living together, but no one wanted to be soaked without umbrella. Unfortunately, they only had one umbrella, which is too small to take more than two individuals. The time that everyone needs to spent to go to the department is known. If two guys came back together, it will take the longer time of this two guys. The question is the earliest time they come back to the department.
Input
The first line contains an integer T(1<=T<=20),which is the number of test cases.
For each testcase:
The first line contains one integer N ,1<=N<=1000, present N ACMers want to come back,
The second line contains N integers Si, present the time the ith ACMers need.
For each testcase:
The first line contains one integer N ,1<=N<=1000, present N ACMers want to come back,
The second line contains N integers Si, present the time the ith ACMers need.
Output
The shortest time they need to come to the department.
Sample Input
141 2 5 10
Sample Output
17
Author
0 0
- 浙江科技学院第十三届程序设计竞赛 1008-A Heavy Rainy Day【贪心思维】
- 浙江科技学院第十三届程序设计竞赛 1008:A Heavy Rainy Day【贪心】
- 浙江科技学院第十三届程序设计竞赛 1008 A Heavy Rainy Day 贪心
- 浙江科技学院第十三届程序设计竞赛1008
- 浙江科技学院第十三届程序设计竞赛1001
- 浙江科技学院第十三届程序设计竞赛 1007:幸福指数【水】
- 浙江科技学院第十三届程序设计竞赛 1007-幸福指数
- POJ 2287 Tian Ji -- The Horse Racing&&浙江科技学院第十三届程序设计竞赛1006田忌赛马后传(贪心)
- 浙江科技学院第十三届程序设计竞赛 1001:Let's go to play【细心】
- 浙江科技学院第十三届程序设计竞赛 1006-田忌赛马后传
- hdoj--A Heavy Rainy Day(贪心好题)
- 第十五届北京师范大学程序设计竞赛决赛 A.Another Server【思维】
- 2016福州大学第十三届程序设计竞赛 Problem C 平行四边形数(思维)
- 湖南省第十三届大学生计算机程序设计竞赛 Football Training Camp 贪心
- Rainy day
- rainy day
- 2017年浙江中医药大学大学生程序设计竞赛-B:一生之敌(思维)
- 2017年浙江中医药大学大学生程序设计竞赛-D:CC的神奇背包(思维)
- leetcode:Number of Digit One
- 【NOIP2013提高组day2】华容道
- systick.c
- Object类中方法
- 学习笔记之2016.3.28
- 浙江科技学院第十三届程序设计竞赛 1008-A Heavy Rainy Day【贪心思维】
- Android开源框架(一):AndroidAnnotations
- C++作业2
- mybatis框架配置文件之联表查询
- Fragment中setUserVisibleHint方法的使用
- 解决阻塞读入设备数据问题
- 指针常量和常量指针
- SourceInsight中设置用空格代替tab键的注意事项
- programming collective intelligence读书笔记1