Problem H. Crossing River
时间限制 1000 ms
内存限制 9.765625 MB
A group of N people wishes to go across a river with only one boat, which can at most carry two persons. Therefore some sort of shuttle arrangement must be arranged in order to row the boat back and forth so that all people may cross. Each person has a different rowing speed; the speed of a couple is determined by the speed of the slower one. Your job is to determine a strategy that minimizes the time for these people to get across.
输入数据
输出数据
For each test case, print a line containing the total number of seconds required for all the N people to cross the river.
样例输入
样例输出
$ Mathjax font initiator $