上一页 1 ··· 38 39 40 41 42 43 44 45 46 ··· 120 下一页
摘要: 求 $\sum_{i=0}^{k}\binom{m}{i}\binom{n m}{k i}i^L$ $(1\leqslant n,m\leqslant 2\times 10^7,1\leqslant L\leqslant 2\times 10^5)$ 这个式子比较简洁,然后也没啥可推的,所以我们将 阅读全文
posted @ 2019-11-19 14:49 EM-LGH 阅读(117) 评论(0) 推荐(0) 编辑
摘要: 求 $\sum_{i=0}^{n}\sum_{j=0}^{i}S(i,j)\times 2^j\times (j!)$ 不妨将式子化为 $\sum_{i=0}^{n}\sum_{j=0}^{n}S(i,j)\times 2^j\times (j!)$ (反正如果 $j i$ 的话 $S(i,j)=0 阅读全文
posted @ 2019-11-19 08:13 EM-LGH 阅读(115) 评论(0) 推荐(0) 编辑
摘要: 入门知识点 FFT/NTT 这里令 \(A(x)\) 表示多项式 \(A\) 在 \(x\) 处的取值,\(A[x]\) 表示多项式 \(A\) 的第 \(x\) 项. 卷积形如: 令 \(C[r]=\sum_{p,q}[(p+q)\mod n=r]A[p]\times B[q]\) 设 \(w^{ 阅读全文
posted @ 2019-11-18 20:54 EM-LGH 阅读(850) 评论(0) 推荐(1) 编辑
摘要: code: #include <bits/stdc++.h> #define ll long long #define setIO(s) freopen(s".in","r",stdin) using namespace std; int n; const ll mod=167772161,G=3, 阅读全文
posted @ 2019-11-18 20:17 EM-LGH 阅读(148) 评论(0) 推荐(0) 编辑
摘要: 给定长度为 $n$ 的序列, 每个位置都可以被染成 $m$ 种颜色中的某一种. 如果恰好出现了 $s$ 次的颜色有 $k$ 种, 则会产生 $w_{k}$ 的价值. 求对于所有可能的染色方案,获得价值和对 $1004535809$ 取模的结果. 设 $lim=min(m,\frac{n}{s})$, 阅读全文
posted @ 2019-11-18 18:41 EM-LGH 阅读(156) 评论(0) 推荐(0) 编辑
摘要: 今天开始学习丧心病狂的多项式qaq...... . code: #include <bits/stdc++.h> #define ll long long #define setIO(s) freopen(s".in","r",stdin) using namespace std; int qpow 阅读全文
posted @ 2019-11-18 18:36 EM-LGH 阅读(135) 评论(0) 推荐(0) 编辑
摘要: 联赛前练练码力. code: #include <vector> #include <cstdio> #include <cstring> #include <algorithm> #define N 200006 #define ll long long #define lson t[x].ch[ 阅读全文
posted @ 2019-11-10 10:59 EM-LGH 阅读(252) 评论(0) 推荐(0) 编辑
摘要: 因为题中的操作是区间加法,所以满足前缀相减性. 而每一次查询的时候还是单点查询,所以直接用可持久化线段树维护差分数组,然后查一个前缀和就行了. code: #include <bits/stdc++.h> #define N 200004 #define LL long long #define s 阅读全文
posted @ 2019-11-09 16:22 EM-LGH 阅读(213) 评论(0) 推荐(0) 编辑
摘要: 虽然是裸的换根dp,但是为了在联赛前锻炼码力,强行上了点分树+线段树. 写完+调完总共花了不到 $50$ 分钟,感觉还行. code: #include <bits/stdc++.h> #define N 420004 #define LL long long #define setIO(s) fr 阅读全文
posted @ 2019-11-09 16:17 EM-LGH 阅读(150) 评论(0) 推荐(0) 编辑
摘要: 你发现 pizza 种类数不会很多,状压一下就可以了 code: #include <bits/stdc++.h> #define M 11 #define N 100005 #define LL long long using namespace std; int n,m,cnt; int v[1 阅读全文
posted @ 2019-11-08 16:20 EM-LGH 阅读(168) 评论(0) 推荐(0) 编辑
上一页 1 ··· 38 39 40 41 42 43 44 45 46 ··· 120 下一页