07 2020 档案

摘要:lei/ \(\sum^n_{i = 1} lcm(i,n)=\sum^{n}_{i=1}\frac{in}{gcd(i, n)}=\) \(\sum^{n}_{d|n}\sum^{n}_{i=1}\frac{in}{d}[gcd(i,n)==d]=\) \(n \times \sum^{n}_{d 阅读全文
posted @ 2020-07-28 17:20 HN-wrp 阅读(103) 评论(0) 推荐(0)
摘要:exgcd $$ x = y \ \ y = t - a /b \times y$$ CRT \(ans = \sum_{i = 1}^n{b_i\times M_i\times inv(M_i,mod_i)}\) \(M_k=(\prod_{i=1}^n {} mod_i)/mod_k\) \(i 阅读全文
posted @ 2020-07-25 20:14 HN-wrp 阅读(137) 评论(0) 推荐(0)
摘要:struct PAM { int ch[N][26], fail[N], len[N]; int tot, las; PAM() { len[0] = 0; len[1] = -1; fail[0] = 1; tot = 1; las = 0; } inline int gtfail(int x, 阅读全文
posted @ 2020-07-23 16:09 HN-wrp 阅读(72) 评论(0) 推荐(0)
摘要:#include <cstdio> #include <cstring> #include <algorithm> using namespace std; #define R register #define LL long long const int inf = 0x3f3f3f3f; con 阅读全文
posted @ 2020-07-22 09:00 HN-wrp 阅读(128) 评论(0) 推荐(0)