# | TimeUTC-0 | Username | Problem | Language | Result | Execution time | Memory |
---|---|---|---|---|---|---|---|
1159964 | fryingduc | Constellation 3 (JOI20_constellation3) | C++20 | 250 ms | 92668 KiB |
#include "bits/stdc++.h"
using namespace std;
#ifdef duc_debug
#include "bits/debug.h"
#else
#define debug(...)
#endif
const int maxn = 2e5 + 5;
const int LG = 18;
int n, m, a[maxn];
int x[maxn], y[maxn], c[maxn];
pair<int, int> st[maxn][LG + 1];
vector<int> g[maxn];
int lg2[maxn];
int up[maxn][LG + 1], root;
vector<int> stars[maxn];
long long f[maxn];
long long fs[maxn];
int sz[maxn], head[maxn], h[maxn];
int tin[maxn], tout[maxn], rev[maxn], timer;
long long bit[maxn];
void update(int i, long long val) {
for (; i <= n; i += i & (-i)) {
bit[i] += val;
}
# | Verdict | Execution time | Memory | Grader output |
---|---|---|---|---|
Fetching results... |
# | Verdict | Execution time | Memory | Grader output |
---|---|---|---|---|
Fetching results... |
# | Verdict | Execution time | Memory | Grader output |
---|---|---|---|---|
Fetching results... |