OkazakiYumemi / okazakiyumemi.github.io

Maybe just a blog
https://okazakiyumemi.github.io/
0 stars 0 forks source link

「CodeChef LUCKYDAY」Lucky Days | Okazaki Yumemi's blog #160

Open OkazakiYumemi opened 3 years ago

OkazakiYumemi commented 3 years ago

https://okazakiyumemi.github.io/blog/CC-LUCKYDAY/

题意简述有序列 $S$,其中 $S_1=A,S_2=B;Si=X\cdot S{i-1}+Y\cdot S{i-2}+Z(i>2)\% P$。$Q$ 个询问求 $\sum\limits{i=L}^{R}[S_i=C]$。$A,B,X,Y,C,P,Q$ 均给定,$P$ 为不超过 $10007$ 的质数,$0\le A,B,X,Y,C<P$,$Q\le 2\times 10^4$,