A. Namomo Subsequence
这次算明白数了。
#include <bits/stdc++.h>
using namespace std;
using ll = long long;
const int mod = 998244353;
char q[1000009];
ll ql, ans, k, kc, a, xsum, s, pre[1000005][62], hf, s1[1000005], s2[1000005], rp[1000005], to[1000005],lst[1000005],inv2,glst[100];
ll suf[63][63],res[63][63
more...