# | TimeUTC-0 | Username | Problem | Language | Result | Execution time | Memory |
---|---|---|---|---|---|---|---|
307063 | jungsnow | ICC (CEOI16_icc) | C++14 | 0 ms | 0 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>
#include "icc.h"
#define x first
#define y second
using namespace std;
const int N = 101;
typedef pair <int, int> ii;
struct dsu {
int n, p[N], s[N], C;
vector <int> child[N];
dsu() {};
void init(int _n) {
n = _n;
C = n;
for (int i = 1; i <= n; ++i) {
p[i] = i;
s[i] = 1;
child[i].push_back(i);
}
}
int anc(int u) {
return (p[u] == u ? u : p[u] = anc(p[u]));
}