xehoth / xehoth-blog-comment

0 stars 0 forks source link

「BZOJ 4105」平方运算-线段树 | xehoth #284

Open xehoth opened 7 years ago

xehoth commented 7 years ago

https://blog.xehoth.cc/BZOJ4105/

现有一个长度为 $n$ 的序列 ${x_1, x_2, \cdots, x_n}$,要求支持两种操作:0 l r 表示将 $i \in [l, r], x_i \leftarrow xi^2 \bmod p$1 l r 询问 $\sum\limits{i = l} ^ r x_i$