Type: Default 1000ms 256MiB

数组13 水桶

You cannot submit for this problem because the contest is ended. You can click "Open in Problem Set" to view this problem in normal mode.

问题描述

有n个数,a[1],a[2],…,a[n] 。

(a[i], n<=1,000,000)

求max( min(a[L],a[R])*(R-L))

输入

5
3 2 5 1 1

输出

6

解释

取L=1,R=3, min(3,5)*(3-1)=6

此题拓展题 T183637 变异距离(2021 CoE III C) - 洛谷

初一年级数组3

Not Claimed
Status
Done
Problem
12
Open Since
2022-12-5 0:00
Deadline
2022-12-13 23:59
Extension
24 hour(s)