4578
hdu - 4578(线段树)
题目:Yuanfang is puzzled with the question below: There are n integers, a1, a2, …, an. The initial values of them are 0. There are four kinds of operati ......
Transformation HDU - 4578
题目链接 $1$ 题目链接 $2$ 题解 设一个区间的和、平方和、立方和分别是 $sum_0,sum_1,sum_2$ 对于 $add$ 操作,推推公式可知 $\begin{cases}newsum_2=sum_2+val^3\times len+3\times val\times sum_1+3\ ......