#3177. Mandarin Orange
0
Mandarin Orange
Mandarin Orange
题目描述
There are dishes arranged in a row in front of Takahashi. The -th dish from the left has oranges on it. Takahashi will choose a triple of integers satisfying all of the following conditions:
; ; for every integer between and (inclusive), .
He will then pick up and eat oranges from each of the -th through -th dishes from the left. At most how many oranges can he eat by choosing the triple to maximize this number?
输入格式
Input is given from Standard Input in the following format:
输出格式
Print the maximum number of oranges Takahashi can eat.
6
2 4 4 9 4 9
20
6
200 4 4 9 4 9
200
提示
All values in input are integers.
By choosing , he can eat oranges.
By choosing , he can eat oranges.
标签: AtCoder|abc189C
来源
AtCoder|abc189C