Problem G: 【一本通基础贪心】过河
Memory Limit:128 MB
Time Limit:1.000 S
Judge Style:Text Compare
Creator:
Submit:3
Solved:1
Description
几个人划船过河,每次船上过两人但要有一人把船划回,速度由慢者决定,问过河所需最短时间。
Input
输入t组数据,每组数据第1行输入n,第2行输入n个数,表示每个人划船过河的时间。
Output
输出t行数据,每行1个数,表示每组过河最少时间。
Sample Input Copy
1
4
1 2 5 10
Sample Output Copy
17
HINT
t<=50,n<=10000