# | 제출 시각 | 아이디 | 문제 | 언어 | 결과 | 실행 시간 | 메모리 |
---|---|---|---|---|---|---|---|
847009 | 2023-09-09T01:27:54 Z | 12345678 | 슈퍼트리 잇기 (IOI20_supertrees) | C++17 | 162 ms | 22096 KB |
#include "supertrees.h" #include <bits/stdc++.h> using namespace std; const int nx=1e3+5; int gc; bool vs[nx]; vector<vector<int>> g(nx); int construct(std::vector<std::vector<int>> p) { int n = p.size(); vector<vector<int>> answer(n, vector<int> (n)); for (int i=0; i<n; i++) { if (!vs[i]) { queue<int> q; q.push(i); vs[i]=1; while (!q.empty()) { int x=q.front(); q.pop(); g[gc].push_back(x); for (int j=0; j<n; j++) if (p[i][j]&&!vs[j]) q.push(j), vs[j]=1; } for (auto x:g[gc]) for (auto y:g[gc]) if (!p[x][y]) return 0; for (int j=0; j<g[gc].size()-1; j++) answer[g[gc][j]][g[gc][j+1]]=answer[g[gc][j+1]][g[gc][j]]=1; gc++; } } build(answer); return 1; } /* 5 1 1 1 0 0 1 1 1 0 0 1 1 1 0 0 0 0 0 1 1 0 0 0 1 1 */
Compilation message
# | 결과 | 실행 시간 | 메모리 | Grader output |
---|---|---|---|---|
1 | Correct | 0 ms | 348 KB | Output is correct |
2 | Correct | 0 ms | 348 KB | Output is correct |
3 | Correct | 0 ms | 348 KB | Output is correct |
4 | Correct | 0 ms | 348 KB | Output is correct |
5 | Correct | 0 ms | 348 KB | Output is correct |
6 | Correct | 6 ms | 1132 KB | Output is correct |
7 | Correct | 162 ms | 22052 KB | Output is correct |
# | 결과 | 실행 시간 | 메모리 | Grader output |
---|---|---|---|---|
1 | Correct | 0 ms | 348 KB | Output is correct |
2 | Correct | 0 ms | 348 KB | Output is correct |
3 | Correct | 0 ms | 348 KB | Output is correct |
4 | Correct | 0 ms | 348 KB | Output is correct |
5 | Correct | 0 ms | 348 KB | Output is correct |
6 | Correct | 6 ms | 1132 KB | Output is correct |
7 | Correct | 162 ms | 22052 KB | Output is correct |
8 | Correct | 1 ms | 344 KB | Output is correct |
9 | Correct | 0 ms | 348 KB | Output is correct |
10 | Correct | 1 ms | 348 KB | Output is correct |
11 | Correct | 1 ms | 348 KB | Output is correct |
12 | Correct | 6 ms | 1116 KB | Output is correct |
13 | Correct | 155 ms | 22096 KB | Output is correct |
14 | Incorrect | 0 ms | 348 KB | Answer gives possible 1 while actual possible 0 |
15 | Halted | 0 ms | 0 KB | - |
# | 결과 | 실행 시간 | 메모리 | Grader output |
---|---|---|---|---|
1 | Correct | 0 ms | 348 KB | Output is correct |
2 | Correct | 0 ms | 348 KB | Output is correct |
3 | Correct | 0 ms | 348 KB | Output is correct |
4 | Incorrect | 0 ms | 344 KB | Answer gives possible 1 while actual possible 0 |
5 | Halted | 0 ms | 0 KB | - |
# | 결과 | 실행 시간 | 메모리 | Grader output |
---|---|---|---|---|
1 | Correct | 0 ms | 348 KB | Output is correct |
2 | Incorrect | 0 ms | 348 KB | Too few ways to get from 0 to 1, should be 2 found 1 |
3 | Halted | 0 ms | 0 KB | - |
# | 결과 | 실행 시간 | 메모리 | Grader output |
---|---|---|---|---|
1 | Correct | 0 ms | 348 KB | Output is correct |
2 | Correct | 0 ms | 348 KB | Output is correct |
3 | Correct | 0 ms | 348 KB | Output is correct |
4 | Correct | 0 ms | 348 KB | Output is correct |
5 | Correct | 0 ms | 348 KB | Output is correct |
6 | Correct | 6 ms | 1132 KB | Output is correct |
7 | Correct | 162 ms | 22052 KB | Output is correct |
8 | Correct | 1 ms | 344 KB | Output is correct |
9 | Correct | 0 ms | 348 KB | Output is correct |
10 | Correct | 1 ms | 348 KB | Output is correct |
11 | Correct | 1 ms | 348 KB | Output is correct |
12 | Correct | 6 ms | 1116 KB | Output is correct |
13 | Correct | 155 ms | 22096 KB | Output is correct |
14 | Incorrect | 0 ms | 348 KB | Answer gives possible 1 while actual possible 0 |
15 | Halted | 0 ms | 0 KB | - |
# | 결과 | 실행 시간 | 메모리 | Grader output |
---|---|---|---|---|
1 | Correct | 0 ms | 348 KB | Output is correct |
2 | Correct | 0 ms | 348 KB | Output is correct |
3 | Correct | 0 ms | 348 KB | Output is correct |
4 | Correct | 0 ms | 348 KB | Output is correct |
5 | Correct | 0 ms | 348 KB | Output is correct |
6 | Correct | 6 ms | 1132 KB | Output is correct |
7 | Correct | 162 ms | 22052 KB | Output is correct |
8 | Correct | 1 ms | 344 KB | Output is correct |
9 | Correct | 0 ms | 348 KB | Output is correct |
10 | Correct | 1 ms | 348 KB | Output is correct |
11 | Correct | 1 ms | 348 KB | Output is correct |
12 | Correct | 6 ms | 1116 KB | Output is correct |
13 | Correct | 155 ms | 22096 KB | Output is correct |
14 | Incorrect | 0 ms | 348 KB | Answer gives possible 1 while actual possible 0 |
15 | Halted | 0 ms | 0 KB | - |