雖然,意譯出來了.不過,根據(jù)你給的 樣例,似乎,有問題.
不知道你,是否帖錯了數(shù)據(jù).
題目描述:
有N個人想要用一只船過河,并且這只船一次最多只能承載兩個人.因此,這就需要一個有序的安排來使得船能夠過去,然后被送回來,最后使得所有的人都能過河.每個人劃船的速度各不相同.如果幾個人一起乘船的話,那么船的速度等于速度最慢的那個人的劃船速度.你的任務就是決定一個策略使得所有的人過河所花的時間最短.
輸入:
第一行將包含一個整形數(shù)T(1
英語翻譯
英語翻譯
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.
Input
The first line of the input contains a single integer T (1
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.
Input
The first line of the input contains a single integer T (1
英語人氣:348 ℃時間:2020-09-29 20:28:58
優(yōu)質解答
我來回答
類似推薦
猜你喜歡
- 1自天然藥物提取液中識別生物堿是否存在的主要反應及其試劑有哪些
- 2已知函數(shù)f ( x )等于(cos x)的四次方減去2sin xcos x減去(sin x)的四次方.1)求f ( x ) 的最小正周期;...
- 3在9 8 7 6 5 4 3 2 1=20添上加減乘除使等式成立
- 4用“攛掇”“絮叨”“怠慢”造句
- 5△ABC中,B>90° a=2x-5 b=x+1 c=4 求 x的取值范圍.
- 6Experience more than sufficiently teaches that men govern nothing with more difficult than their tongues.問govern sth wit
- 7氧化銅與稀硫酸反應的化學方程式
- 8為什么高中化學先學的離子反應再學氧化還原反應 離子反應里面有好多寫的時候要用到氧化還原的知識的啊
- 9已知:關于x的方程kx^2-(4k+1)x+3k+3=0
- 10語文作文:如何審題?如何理解話題?
- 11先生的讀音,生是讀一聲還是輕聲
- 12額定電壓220V、容量100L、電阻24.2Ω的電熱水器,它的電功率是多少?