# | TimeUTC-0 | Username | Problem | Language | Result | Execution time | Memory |
---|---|---|---|---|---|---|---|
63639 | evpipis | Parachute rings (IOI12_rings) | C++11 | 2809 ms | 122148 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;
//#define TEST
#define fi first
#define se second
#define mp make_pair
#define pb push_back
typedef long long ll;
typedef pair<int, int> ii;
const int len = 1e6+5;
int n, state, cycle, last;
int par[5][len], deg[5][len], sz[5][len], block[5][len], fine[5];
vector<int> adj[len];
vector<ii> edge;
int fin(int t, int i){
if (par[t][i] == i) return i;
return par[t][i] = fin(t, par[t][i]);
}
void join(int t, int i, int j){
i = fin(t, i), j = fin(t, j);
if (i == j) return;
par[t][i] = j;
sz[t][j] += sz[t][i];
}
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... |