摘要: 前置知识 "大步小步定理" 以及是个人都会的exgcd Problem "洛谷P4195 【模板】exBSGS/Spoj3105 Mod" Solution $$ a^x\equiv b\mod p\\ a\times a^{x 1}\equiv b\mod p\\ 令X=a^{x 1}\\ \th 阅读全文
posted @ 2019-05-17 09:52 The_KOG 阅读(207) 评论(0) 推荐(1) 编辑
摘要: Problem "洛谷P3846 [TJOI2007]可爱的质数" Solution $$ a^x\equiv b \mod p\\ a^{i m j}\equiv b \mod p\\ (a^m)^i\equiv b\times a^j \mod p $$ meet in middle 取$m=\ 阅读全文
posted @ 2019-05-17 09:35 The_KOG 阅读(120) 评论(0) 推荐(0) 编辑