# | TimeUTC-0 | Username | Problem | Language | Result | Execution time | Memory |
---|---|---|---|---|---|---|---|
1172240 | gyg | Keys (IOI21_keys) | C++20 | 3100 ms | 154720 KiB |
#include "keys.h"
#include <bits/stdc++.h>
using namespace std;
#define vec vector
#define arr array
#define pii pair<int, int>
#define fir first
#define sec second
const int N = 3e5 + 5, INF = 1e9;
// Zero indexing
int n;
arr<int, N> cl;
arr<vec<pii>, N> adj;
struct Dsj {
arr<int, N> pr;
arr<vec<int>, N> st;
void intl() {
for (int u = 0; u < n; u++)
pr[u] = u, st[u] = {u};
}
void mrg(int u, int v) { // v into u
u = pr[u], v = pr[v];
assert(u != v);
for (int w : st[v])
pr[w] = u, st[u].push_back(w);
}
} dsj;
# | Verdict | Execution time | Memory | Grader output |
---|---|---|---|---|
Fetching results... |
# | Verdict | Execution time | Memory | Grader output |
---|---|---|---|---|
Fetching results... |
# | Verdict | Execution time | Memory | Grader output |
---|---|---|---|---|
Fetching results... |
# | Verdict | Execution time | Memory | Grader output |
---|---|---|---|---|
Fetching results... |
# | Verdict | Execution time | Memory | Grader output |
---|---|---|---|---|
Fetching results... |