摘要:
快速沃尔什变换 FWT 也和FFT很像。 c++ //FWT加上类似背包DP void FST(int d[],int a[],int n){ for(int i=1;i 1]+(i&1); for(int i=0;i 练习 【codeforces914G】Sum the Fibonacci 阅读全文
posted @ 2018-07-24 20:16
LSQ647
阅读(174)
评论(0)
推荐(0)
摘要:
快速数论变换 NTT 和FFT很像。 typedef long long ll; const int P=998244353; inline ll ksm(ll a,ll n){ ll ans=1; for(;n;n =1,a=a a%P) if(n&1) ans=ans a%P; return a 阅读全文
posted @ 2018-07-24 13:12
LSQ647
阅读(226)
评论(0)
推荐(0)

浙公网安备 33010602011771号