P10606

· · 题解

easy 版本的结论非常简单,由于所有 a_i 均为正数,容易证明只用进行一次反转是最优的。记 r=\max\{x\},答案即为 \min_{r\le i\le n} a_i