1.9k2 分钟

树哈希方法,好像挺简单的一个东西。 #include <bits/stdc++.h> /* #include<ext/pb_ds/assoc_container.hpp> #include<ext/pb_ds/hash_policy.hpp> */ using namespace std; const double eps = 1e-10; const double pi = 3.1415926535897932384626433832795; const doubl
3.6k3 分钟

这次算明白数了。 #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
7.8k7 分钟

暑假多校弄出来的,今晚没弄出来,寄! #include <bits/stdc++.h> using namespace std; using ll = long long; const int NR = 1 << 22; const int G = 3, Gi = 332748118; const int mod = 998244353, MOD = mod; #define f(i, a, b) for (int i = a; i <= b; i++) #define L
1.9k2 分钟

调了一下午,注意k为0时候下标会偏移都后一个。 贪的时候,x为整数显然是贪连续k,负数则贪心放置于头尾。 #include <bits/stdc++.h> /* #include<ext/pb_ds/assoc_container.hpp> #include<ext/pb_ds/hash_policy.hpp> */ using namespace std; const double eps = 1e-10; const double pi = 3.141592653
1.4k1 分钟

补完发现自己就是个弱智东西。 #include <bits/stdc++.h> /* #include<ext/pb_ds/assoc_container.hpp> #include<ext/pb_ds/hash_policy.hpp> */ using namespace std; const double eps = 1e-10; const double pi = 3.1415926535897932384626433832795; const double e