NTT
文章平均质量分 79
yysys
yysys
展开
专栏收录文章
- 默认排序
- 最新发布
- 最早发布
- 最多阅读
- 最少阅读
-
【NTT】 HDOJ 5322 Hope
推出公式以后就可以NTT计算了。。。。#include using namespace std;typedef long long LL;const int mod = 998244353;const int maxn = 300005;LL f[maxn];LL g[maxn];LL dp[maxn];LL A[maxn];LL B[maxn];int m1[maxn原创 2015-07-29 18:08:07 · 621 阅读 · 0 评论 -
【NTT】 ZOJ 3899 State Reversing
先找出第二类斯特林数的公式,然后把公式分解成卷积的形式,先做一遍NTT,然后对于每次询问只要用线段树求出有多少个空闲的房间就可以了。#include using namespace std;typedef long long LL;#define lson o << 1, L, mid#define rson o << 1 | 1, mid+1, R#define ls o <<原创 2015-09-14 13:11:49 · 835 阅读 · 0 评论 -
【NTT】 HDOJ 5279 YJC plays Minecraft
推出公式以后就可以ntt了。。。#include using namespace std;typedef long long LL;const int mod = 998244353;const int maxn = 700005;LL dp[100005],dp2[100005];LL a[maxn], b[maxn], c[maxn], xp[maxn];LL f[100原创 2015-09-17 18:21:27 · 496 阅读 · 0 评论 -
【NTT】 ZOJ 3874 Permutation Graph
推出公式以后分治ntt优化即可。。。#include using namespace std;typedef long long LL;const int maxn = 100005;const int maxm = 300005;const int mod = 786433;LL a[maxm], b[maxm], c[maxm];LL f[maxn], dp[maxn原创 2015-09-18 13:06:22 · 672 阅读 · 0 评论
分享