BZOJ 2219: 数论之神

某岛 at 
http://www.lydsy.com/JudgeOnline/problem.php?id=2219 http://jcvb.is-programmer.com/posts/42036 考察同余方程… a^x = b (mod p) 已知 x,b 时,求 a。 —— 首先 CRT 。。。(保证 p 有原根可以取指标,取指标大概可以类比离散对数。。) x ind a = ind b ( mod p) 求出原根 g。。(似乎只能暴力? 然后用 exDlog 求出 ind b。。。 于是就转换成了线性同余方程问题。。 https://gist.github.com/lychees/86926b6……