# | Submission time | Handle | Problem | Language | Result | Execution time | Memory |
---|---|---|---|---|---|---|---|
575016 | 2022-06-09T14:14:23 Z | AJ00 | Connecting Supertrees (IOI20_supertrees) | C++14 | 169 ms | 23932 KB |
#include <bits/stdc++.h> #include "supertrees.h" using namespace std; int n; const int MOD = 1000000007; const int INF = 1e18; int construct(vector<vector<int>> p){ int n = p[0].size(); vector<vector<int>> b; b.resize(n); for (int i = 0; i < n; i++){ b[i].resize(n); for (int j = 0; j < n; j++){ b[i][j] = 0; } } if (n == 1){ build(b); return 1; } for (int i = 0; i < n; i++){ if (i == 0){ b[0][1] = 1; } else if (i == n-1){ b[n-1][n-2] = 1; } else { b[i][i-1] = 1; b[i][i+1] = 1; } } /* for (int i = 0; i < n; i++){ for (int j = 0; j < n; j++){ } }*/ build(b); return 1; }
Compilation message
# | Verdict | Execution time | Memory | Grader output |
---|---|---|---|---|
1 | Correct | 0 ms | 212 KB | Output is correct |
2 | Correct | 1 ms | 300 KB | Output is correct |
3 | Correct | 1 ms | 212 KB | Output is correct |
4 | Correct | 1 ms | 300 KB | Output is correct |
5 | Correct | 1 ms | 212 KB | Output is correct |
6 | Correct | 8 ms | 1176 KB | Output is correct |
7 | Correct | 169 ms | 23932 KB | Output is correct |
# | Verdict | Execution time | Memory | Grader output |
---|---|---|---|---|
1 | Correct | 0 ms | 212 KB | Output is correct |
2 | Correct | 1 ms | 300 KB | Output is correct |
3 | Correct | 1 ms | 212 KB | Output is correct |
4 | Correct | 1 ms | 300 KB | Output is correct |
5 | Correct | 1 ms | 212 KB | Output is correct |
6 | Correct | 8 ms | 1176 KB | Output is correct |
7 | Correct | 169 ms | 23932 KB | Output is correct |
8 | Incorrect | 1 ms | 212 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 | 1 ms | 212 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 | 300 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 | 212 KB | Output is correct |
2 | Correct | 1 ms | 300 KB | Output is correct |
3 | Correct | 1 ms | 212 KB | Output is correct |
4 | Correct | 1 ms | 300 KB | Output is correct |
5 | Correct | 1 ms | 212 KB | Output is correct |
6 | Correct | 8 ms | 1176 KB | Output is correct |
7 | Correct | 169 ms | 23932 KB | Output is correct |
8 | Incorrect | 1 ms | 212 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 | 212 KB | Output is correct |
2 | Correct | 1 ms | 300 KB | Output is correct |
3 | Correct | 1 ms | 212 KB | Output is correct |
4 | Correct | 1 ms | 300 KB | Output is correct |
5 | Correct | 1 ms | 212 KB | Output is correct |
6 | Correct | 8 ms | 1176 KB | Output is correct |
7 | Correct | 169 ms | 23932 KB | Output is correct |
8 | Incorrect | 1 ms | 212 KB | Too many ways to get from 0 to 1, should be 0 found no less than 1 |
9 | Halted | 0 ms | 0 KB | - |