摘要: 对一个常系数线性递推式$$f_n = \sum_{i=1}^k a_i \times f_{n-i}$$ 矩阵快速幂需要 $O(k^3logn)$ ? 这篇文章将教您在至多为 $O(k^2logn + k^4)$ 时间内搞这个式子 有什么用嘛,可能对我这种省选注定退役的人没啥用,但对于 NOI 及以 阅读全文
posted @ 2018-12-11 20:51 探险家Mr.H 阅读(279) 评论(0) 推荐(0) 编辑
摘要: 首先 FFT 没啥可说的,背诵全文 #include<bits/stdc++.h> #define LL long long using namespace std; const int maxn = 4000100,mod = 998244353,iG = 332748118,G = 3; int 阅读全文
posted @ 2018-12-11 13:55 探险家Mr.H 阅读(232) 评论(0) 推荐(0) 编辑