# | TimeUTC-0 | Username | Problem | Language | Result | Execution time | Memory |
---|---|---|---|---|---|---|---|
143523 | mosesmayer | Split the Attractions (IOI19_split) | C++17 | 257 ms | 20800 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 "split.h"
#include <bits/stdc++.h>
#define fi first
#define se second
#define eb emplace_back
#define pb push_back
#define ALL(x) x.begin(), x.end()
using namespace std;
typedef pair<int,int> pii;
typedef vector<int> vi;
struct Dsu{
int n; vi par;
Dsu() {}
Dsu(int n): n(n), par(n) {}
void init(){ iota(par.begin(), par.end(), 0); }
int fpr(int u){ return par[u] == u ? u : par[u] = fpr(par[u]); }
bool merge(int u, int v){
if ((u = fpr(u)) == (v = fpr(v))) return 0;
par[v] = u;
return 1;
}
};
const int mxsz = 1e5 + 5;
int n, m;
Dsu dsu;
vector<pii> ord, edges;
vi g[mxsz], adj[mxsz];
vi ans;
Compilation message (stderr)
# | 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... |