1.5k1 分钟

在此题中。 #include <algorithm> #include <bitset> #include <map> #include <vector> #include <string> #include <cstring> #include <iostream> #include <cmath> #include <stack> #include <set> #include <queue> /* #include<ext/pb_
1.2k1 分钟

右上角的元素重要性大于左下角的 int tt, n; struct dsu { dsu(int n) { p.resize(n + 1); s.resize(n + 1); for (int i = 1; i <= n; i++) p[i] = i, s[i] = 1; } vector<int> p, s; int find(int x) { if (x !&
1k1 分钟

下降幂每次都重新计算会TLE :) #include <cstdio> #include <assert.h> using namespace std; using ll = long long; const int mod = 998244353; ll s[(int)2e3 + 9][(int)2e3 + 9] = {1}; ll n, m, k, tt; ll cal(ll x, ll t) { ll res = 1; for (ll i = x; i >
2.4k2 分钟

#include <cstdio> #include<assert.h> using namespace std; using ll = long long; const int mod = 998244353; template <int MOD, int RT> struct mint { static const int mod = MOD; static constexpr mint rt() { return RT; } // primitive