# | TimeUTC-0 | Username | Problem | Language | Result | Execution time | Memory |
---|---|---|---|---|---|---|---|
736156 | DAleksa | Stranded Far From Home (BOI22_island) | C++17 | 495 ms | 77892 KiB |
This submission is migrated from previous version of oj.uz, which used different machine for grading. This submission may have different result if resubmitted.
#include <bits/stdc++.h>
using namespace std;
struct DSU {
vector<int> par;
int n;
DSU(int _n) {
n = _n;
par.resize(n);
for(int i = 0; i < n; i++) par[i] = i;
}
int find_par(int u) {
if(u == par[u]) return par[u];
return par[u] = find_par(par[u]);
}
bool check(int u, int v) { return find_par(u) == find_par(v); }
void join(int u, int v) {
u = find_par(u);
v = find_par(v);
par[v] = u;
}
};
const int N = 2e5 + 10;
int n, m;
int a[N];
vector<int> g[N];
int order[N];
set<int> can[N];
# | 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... |