| # | Time | Username | Problem | Language | Result | Execution time | Memory |
|---|---|---|---|---|---|---|---|
| 603471 | CyberCow | Connecting Supertrees (IOI20_supertrees) | C++17 | 227 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 <vector>
using namespace std;
int construct(vector<std::vector<int>> p) {
int n = p.size();
vector<std::vector<int>> ans(n);
int st1 = 0, st2 = 0, st0 = 0;
for (int i = 0; i < n; i++)
{
for (int j = 0; j < p[i].size(); j++)
{
if (p[i][j] == 1)
st1 = 1;
else if (p[i][j] == 2)
st2 = 1;
else
st0 = 1;
}
}
if (st1 == 1 && st2 == 0 && st0 == 0)
{
ans[0].push_back(0);
for (int i = 1; i < n; i++)
{
ans[0].push_back(1);
}
for (int i = 1; i < n; i++)
{
ans[i].push_back(1);
for (int j = 1; j < n; j++)
{
ans[i].push_back(0);
}
}
}
build(ans);
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... | ||||
