问题1655--js and Fruits

1655: js and Fruits

时间限制: 1Sec 内存限制:128 MB
提交:20 解决:6
[ 状态] [ 讨论版] [ 提交] [命题人: ]
题目描述

输入

输出

样例输入 Copy
2 3 1 5 2 3
样例输出 Copy
8
提示

In the first sample, in order to obtain the optimal answer, you should act as follows.

On the first day collect 3 fruits from the 1-st tree.
On the second day collect 1 fruit from the 2-nd tree and 2 fruits from the 1-st tree.
On the third day collect the remaining fruits from the 2-nd tree.

来源/分类