# | TimeUTC-0 | Username | Problem | Language | Result | Execution time | Memory |
---|---|---|---|---|---|---|---|
534731 | kappa | Kutije (COCI21_kutije) | C++14 | 164 ms | 9412 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;
long long n, m, q;
struct node{
long long parent;
long long rank;
};
node v[200005];
long long find(long long u){
if(u != v[u].parent){
v[u].parent = find(v[u].parent);
}
return v[u].parent;
}
void merge(long long x, long long y){
long long px = find(x);
long long py = find(y);
if(v[px].rank > v[py].rank){
v[py].parent = px;
}else{
v[px].parent = py;
}
# | 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... |