# | TimeUTC-0 | Username | Problem | Language | Result | Execution time | Memory |
---|---|---|---|---|---|---|---|
846220 | vjudge1 | KOVANICE (COI15_kovanice) | C++98 | 2060 ms | 16452 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 <iostream>
#include <vector>
using namespace std;
int n;
int* valueofparent;
int* parentindsu;
bool* visited;
vector<vector<int>> children;
int getpindsu(int n){
if (parentindsu[n - 1] == n) return n;
parentindsu[n - 1] = getpindsu(parentindsu[n - 1]);
return parentindsu[n - 1];
}
void dsumerge(int a, int b){
int pa = getpindsu(a);
int pb = getpindsu(b);
if (pa == pb) return;
parentindsu[a - 1] = pb;
parentindsu[pa - 1] = pb;
}
bool fill(int depth, int node){
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... |