版本比较
U678359 题解(英文版)
正文
增加 2 行删除 2 行
123455678983 行未改动939495969797989910010138 行未改动$*\color{black}{+}\color{red}{\infty}$
Consider how to solve this problem when we only have single-point modification.We have the following conclusions.(this part is premise conclusion) :
- Observation 1 :we only have $O(n)$ ordered pairs $(l,r)$ that satisfy following conditions : $(\max\limits_{i=l+1}^{r-1}a_i)<\min(a_l,a_r)$ . - Observation 1 :we only have $O(n)$ ordered pairs $(l,r)$ that satisfy following conditions : $(\max\limits_{i=l+1}^{r-1}a_i)<\min(a_l,a_r)$ .
Lets $l_i=\max\limits_{j<i,a_j>a_i}(j),r_i=\min\limits_{j>i,a_j>a_i}(j)$ .
Enumerate $(l,r)$ that $(l,r)$ is domination point pair83 行未改动- Observation 16 :定义 $h(x)=\frac{(\sum\limits_{i=1}^{x-1}i^m)}{x^m}$ ,则 $\forall x,h(x)\le h(x+1)$ 。
证明:
定义 $S_n=\sum\limits_{i=1}^{n-1}\{\frac{i}{n}\}$ ,那么显然当 $S_n$ 排序小于 $S_{n+1}$ 的时候结论成立,那么显然 $S_n<S_{n+1}$ ,证毕。 定义 $S_n=\sum\limits_{i=1}^{n-1}\{\frac{i}{n}\}$ ,那么显然当 $S_n$ 排序小于 $S_{n+1}$ 的时候结论成立,那么显然 $S_n<S_{n+1}$ ,证毕。
- Observation 17 :如果 $x^m<(\sum\limits_{i=1}^{x-1}i^m)$ ,那么 $(x+1)^m<(\sum\limits_{i=1}^x i^m)$ 。
证明:由 Observation 16 推得。38 行未改动