Loading

摘要: 大步小步(BSGS) 模板题 给定 $a,b,p$ 求最小 $x$ 满足 $a^x \equiv b \pmod{p}$ 其中 $a,p$ 互质 求法 假定 $m=\left \lceil \sqrt p \right \rceil$,$x=i\cdot m-j$ 其中 $i,j\leq m$ 原式 阅读全文
posted @ 2022-07-18 22:28 Into_qwq 阅读(38) 评论(0) 推荐(0) 编辑
摘要: ![](https://img2022.cnblogs.com/blog/2069905/202207/2069905-20220718142718049-1255042784.png) ![](https://img2022.cnblogs.com/blog/2069905/202207/2069905-20220718145655871-228141186.png) 阅读全文
posted @ 2022-07-18 14:28 Into_qwq 阅读(7) 评论(0) 推荐(0) 编辑
摘要: P1397 [NOI2013] 矩阵游戏 题解 首先考虑 $F_{n,m}$ 是怎么由 $F_{1,1}$ 递推到的 考虑用矩阵优化两个递推式子,那么 $$ \begin{bmatrix} F_{i,j-1}&1 \end{bmatrix} \times\begin{bmatrix}a & 0 \ 阅读全文
posted @ 2022-07-18 13:28 Into_qwq 阅读(21) 评论(0) 推荐(0) 编辑