# | TimeUTC-0 | Username | Problem | Language | Result | Execution time | Memory |
---|---|---|---|---|---|---|---|
421538 | lakshith_ | Connecting Supertrees (IOI20_supertrees) | C++14 | 256 ms | 24056 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 "supertrees.h"
#include <bits/stdc++.h>
using namespace std;
#define what_is(a) cout<< #a << " is " << a << "\n"
#define checker(a) cout << "checker reached " <<a << "\n"
const int maxn = 1000;
struct subset{
int parent,rank;
}subsets[maxn];
int find(int a){
if(subsets[a].parent==a)return a;
subsets[a].parent = find(subsets[a].parent);
return subsets[a].parent;
}
void Union(int a,int b){
a = find(subsets[a].parent),b = find(subsets[b].parent);
if(a==b)return;
if(subsets[a].rank<subsets[b].rank)
subsets[a].parent = b;
else if(subsets[a].rank>subsets[b].rank)
subsets[b].parent = a;
else{
subsets[a].parent = b;
subsets[b].rank++;
# | 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... |
# | Verdict | Execution time | Memory | Grader output |
---|---|---|---|---|
Fetching results... |