# | Time | Username | Problem | Language | Result | Execution time | Memory |
---|---|---|---|---|---|---|---|
497122 | Hanksburger | Connecting Supertrees (IOI20_supertrees) | C++17 | 182 ms | 23928 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;
int construct(vector<vector<int> > P)
{
int N=P.size();
bool subtask1=1, subtask2=1;
for (int i=0; i<N; i++)
{
for (int j=0; j<N; j++)
{
if (P[i][j]==0 || P[i][j]==2 || P[i][j]==3)
subtask1=0;
if (P[i][j]==2 || P[i][j]==3)
subtask2=0;
}
}
vector<vector<int> > ans;
vector<int> tmp;
if (subtask1)
{
tmp.push_back(0);
for (int i=1; i<N; i++)
tmp.push_back(1);
ans.push_back(tmp);
for (int i=1; i<N; i++)
{
tmp.clear();
tmp.push_back(1);
for (int j=1; j<N; j++)
tmp.push_back(0);
ans.push_back(tmp);
}
build(ans);
return 1;
}
else
{
}
}
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... |