# | TimeUTC-0 | Username | Problem | Language | Result | Execution time | Memory |
---|---|---|---|---|---|---|---|
303423 | mechfrog88 | Connecting Supertrees (IOI20_supertrees) | C++14 | 297 ms | 22264 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>
typedef long long ll;
using namespace std;
int construct(vector<vector<int>> p) {
int n = p.size();
vector<vector<int>> ans(n,vector<int>(n));
vector<bool> visited(n,false);
bool ok = true;
for (int z=0;z<n && ok;z++){
if (visited[z]) continue;
vector <ll> g1;
vector <ll> g2;
vector <ll> g3;
for (int x=0;x<n && ok;x++){
if (z == x) continue;
if (p[z][x] == 1){
g1.push_back(x);
visited[x] = true;
for (int x1=0;x1<n && ok;x1++){
if (p[z][x1] != p[x][x1]){
ok = false;
}
}
}
else if (p[z][x] == 2){
g2.push_back(x);
visited[x] = true;
for (int x1=0;x1<n && ok;x1++){
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... |