| # | Time | Username | Problem | Language | Result | Execution time | Memory |
|---|---|---|---|---|---|---|---|
| 310350 | APROHACK | Connecting Supertrees (IOI20_supertrees) | C++14 | 234 ms | 22136 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;
long long padres[1200];
long long fnd(long long nodo){
if(padres[nodo]=nodo)return nodo;
else padres[nodo]=fnd(padres[nodo]);
}
int construct(vector<vector<int> >p) {
int n = p.size();
vector<vector<int> > answer;
for (int i = 0; i < n; i++) {
std::vector<int> row;
row.resize(n);
for(int j = 0 ; j < n ; j ++)row[j]=0;
answer.push_back(row);
padres[i]= i;
}
for(int i = 0 ; i < n ; i ++){
for(int j = 0 ; j < n ; j ++){
if(i+1==j){
answer[i][j]=1;
answer[j][i]=1;
}
}
}
build(answer);
return 1;
}
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... | ||||
| # | Verdict | Execution time | Memory | Grader output |
|---|---|---|---|---|
| Fetching results... | ||||
