摘要: 12种组合计数问题合在一起. code: #include <cmath> #include <cstring> #include <algorithm> #include <cstdio> #include <string> #define ll long long #define ull uns 阅读全文
posted @ 2020-02-04 15:04 EM-LGH 阅读(191) 评论(0) 推荐(0) 编辑
摘要: 模板题呀. code: #include <cstdio> #include <cstring> #include <cmath> #include <map> #include <algorithm> #define ll long long #define setIO(s) freopen(s" 阅读全文
posted @ 2020-02-04 10:12 EM-LGH 阅读(118) 评论(0) 推荐(0) 编辑
摘要: 这里讲一下普通的 BSGS 如何实现: 我们要求解形如 $y^x \equiv z(\mod p)$ 的 $x$ 的整数解(其中 $gcd(y,p)=1$) 我们将 $x$ 写成 $am-b$ 的形式,原式就变为 $y^{am} \equiv z \times y^b (\mod p)$ 然后 $b 阅读全文
posted @ 2020-02-04 09:47 EM-LGH 阅读(161) 评论(0) 推荐(0) 编辑