# | Submission time | Handle | Problem | Language | Result | Execution time | Memory |
---|---|---|---|---|---|---|---|
300800 | 2020-09-17T13:44:59 Z | luciocf | Connecting Supertrees (IOI20_supertrees) | C++14 | 249 ms | 22264 KB |
#include <bits/stdc++.h> #include "supertrees.h" #include <vector> using namespace std; const int maxn = 1e3+10; int construct(vector<vector<int>> p) { int n = p.size(); vector<vector<int>> ans; int u = -1, v = -1; for (int i = 0; i < n; i++) for (int j = 0; j < n; j++) if (p[i][j] == 2) u = i, v = j; if (u == -1) { for (int i = 0; i < n; i++) { vector<int> a; a.resize(n); if (i < n-1) a[i+1] = 1; if (i > 0) a[i-1] = 1; ans.push_back(a); } build(ans); return 1; } }
Compilation message
# | Verdict | Execution time | Memory | Grader output |
---|---|---|---|---|
1 | Correct | 0 ms | 256 KB | Output is correct |
2 | Correct | 0 ms | 256 KB | Output is correct |
3 | Correct | 0 ms | 256 KB | Output is correct |
4 | Correct | 0 ms | 256 KB | Output is correct |
5 | Correct | 0 ms | 256 KB | Output is correct |
6 | Correct | 11 ms | 1152 KB | Output is correct |
7 | Correct | 249 ms | 22264 KB | Output is correct |
# | Verdict | Execution time | Memory | Grader output |
---|---|---|---|---|
1 | Correct | 0 ms | 256 KB | Output is correct |
2 | Correct | 0 ms | 256 KB | Output is correct |
3 | Correct | 0 ms | 256 KB | Output is correct |
4 | Correct | 0 ms | 256 KB | Output is correct |
5 | Correct | 0 ms | 256 KB | Output is correct |
6 | Correct | 11 ms | 1152 KB | Output is correct |
7 | Correct | 249 ms | 22264 KB | Output is correct |
8 | Incorrect | 1 ms | 256 KB | Too many ways to get from 0 to 1, should be 0 found no less than 1 |
9 | Halted | 0 ms | 0 KB | - |
# | Verdict | Execution time | Memory | Grader output |
---|---|---|---|---|
1 | Incorrect | 0 ms | 256 KB | Too many ways to get from 0 to 1, should be 0 found no less than 1 |
2 | Halted | 0 ms | 0 KB | - |
# | Verdict | Execution time | Memory | Grader output |
---|---|---|---|---|
1 | Incorrect | 1 ms | 308 KB | Too many ways to get from 0 to 1, should be 0 found no less than 1 |
2 | Halted | 0 ms | 0 KB | - |
# | Verdict | Execution time | Memory | Grader output |
---|---|---|---|---|
1 | Correct | 0 ms | 256 KB | Output is correct |
2 | Correct | 0 ms | 256 KB | Output is correct |
3 | Correct | 0 ms | 256 KB | Output is correct |
4 | Correct | 0 ms | 256 KB | Output is correct |
5 | Correct | 0 ms | 256 KB | Output is correct |
6 | Correct | 11 ms | 1152 KB | Output is correct |
7 | Correct | 249 ms | 22264 KB | Output is correct |
8 | Incorrect | 1 ms | 256 KB | Too many ways to get from 0 to 1, should be 0 found no less than 1 |
9 | Halted | 0 ms | 0 KB | - |
# | Verdict | Execution time | Memory | Grader output |
---|---|---|---|---|
1 | Correct | 0 ms | 256 KB | Output is correct |
2 | Correct | 0 ms | 256 KB | Output is correct |
3 | Correct | 0 ms | 256 KB | Output is correct |
4 | Correct | 0 ms | 256 KB | Output is correct |
5 | Correct | 0 ms | 256 KB | Output is correct |
6 | Correct | 11 ms | 1152 KB | Output is correct |
7 | Correct | 249 ms | 22264 KB | Output is correct |
8 | Incorrect | 1 ms | 256 KB | Too many ways to get from 0 to 1, should be 0 found no less than 1 |
9 | Halted | 0 ms | 0 KB | - |