推公式,上面是题解AC代码 解题思路,先推出前五项,然后再找规律,把后项除于前项或者前项除于后项一定会发现规律的! #include<bits/stdc++.h> using namespace std; const int maxn = 1e6 + 10; typedef long long ll; ll dp[maxn]; int n,w,q; const ll mod = 998244353; void init() { dp[0] = 1; for(int i = 1; i < maxn; ++i) { dp[i] = (2 *...