# | TimeUTC-0 | Username | Problem | Language | Result | Execution time | Memory |
---|---|---|---|---|---|---|---|
873352 | teokakabadze | Connecting Supertrees (IOI20_supertrees) | C++17 | 169 ms | 26152 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>
#define pb push_back
using namespace std;
int a[1005][1005], i, j, f[1005], a2, a3, k, l, cnt, c, pr[1005];
vector<int> s, d, e;
int construct(std::vector<std::vector<int>> p)
{
int n = p.size();
std::vector<std::vector<int>> answer;
for(i = 0; i < n; i++)
for(j = 0; j < n; j++)
{
if(p[i][j] == 3) return 0;
if(p[i][j] != p[j][i]) return 0;
if(i == j && !p[i][j]) return 0;
}
for(i = 0; i < n; i++)
{
a2 = 0;
for(j = 0; j < n; j++)
if(p[i][j] == 2) a2 = 1;
if(!f[i])
{
e.clear(); d.clear();
if(a2) k = 2; else k = 1;
f[i] = 1, l = i, cnt = 0;
if(k == 2)
# | 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... |