# | Submission time | Handle | Problem | Language | Result | Execution time | Memory |
---|---|---|---|---|---|---|---|
425177 | 2021-06-12T14:40:15 Z | schse | Vision Program (IOI19_vision) | C++17 | 10 ms | 1100 KB |
#include "vision.h" #ifndef EVAL #include "grader.cpp" #endif #include <bits/stdc++.h> using namespace std; void construct_network(int H, int W, int K) { if (H == 1 || W == 1) { vector<int> lr; for (int i = 0; i < H * W - K; i++) lr.push_back(add_and({i, i + K})); int N = add_or(lr); return; } vector<int> orrows; for (int r = 0; r < H; r++) { vector<int> v(W); iota(v.begin(), v.end(), r * W); orrows.push_back(add_or(v)); } vector<int> hdis; hdis.push_back(add_xor(orrows)); for (int dis = 1; dis < K + 1; dis++) { vector<int> c; for (int r = dis; r < H; r++) c.push_back(add_and({orrows[r], orrows[r - dis]})); hdis.push_back(add_or(c)); } vector<int> orcols; for (int c = 0; c < W; c++) { vector<int> v; for (int r = 0; r < H; r++) v.push_back(c + r * W); orcols.push_back(add_or(v)); } vector<int> vdis; vdis.push_back(add_xor(orcols)); for (int dis = 1; dis < K + 1; dis++) { vector<int> c; for (int r = dis; r < W; r++) c.push_back(add_and({orcols[r], orcols[r - dis]})); vdis.push_back(add_or(c)); } vector<int> v; for (int i = 0; i <= K; i++) { if (vdis.size() > i && hdis.size() > K - i) v.push_back(add_and({vdis[i], hdis[K - i]})); } add_or(v); return; }
Compilation message
# | Verdict | Execution time | Memory | Grader output |
---|---|---|---|---|
1 | Correct | 0 ms | 204 KB | Output is correct |
2 | Correct | 0 ms | 204 KB | Output is correct |
3 | Correct | 1 ms | 204 KB | Output is correct |
4 | Correct | 0 ms | 204 KB | Output is correct |
5 | Correct | 0 ms | 204 KB | Output is correct |
6 | Incorrect | 1 ms | 204 KB | WA in grader: Instruction with no inputs |
7 | Halted | 0 ms | 0 KB | - |
# | Verdict | Execution time | Memory | Grader output |
---|---|---|---|---|
1 | Correct | 0 ms | 204 KB | Output is correct |
2 | Correct | 0 ms | 204 KB | Output is correct |
3 | Correct | 1 ms | 204 KB | Output is correct |
4 | Correct | 0 ms | 204 KB | Output is correct |
5 | Correct | 0 ms | 204 KB | Output is correct |
6 | Incorrect | 1 ms | 204 KB | WA in grader: Instruction with no inputs |
7 | Halted | 0 ms | 0 KB | - |
# | Verdict | Execution time | Memory | Grader output |
---|---|---|---|---|
1 | Correct | 0 ms | 204 KB | Output is correct |
2 | Correct | 0 ms | 204 KB | Output is correct |
3 | Correct | 1 ms | 204 KB | Output is correct |
4 | Correct | 0 ms | 204 KB | Output is correct |
5 | Correct | 0 ms | 204 KB | Output is correct |
6 | Incorrect | 1 ms | 204 KB | WA in grader: Instruction with no inputs |
7 | Halted | 0 ms | 0 KB | - |
# | Verdict | Execution time | Memory | Grader output |
---|---|---|---|---|
1 | Correct | 0 ms | 204 KB | Output is correct |
2 | Correct | 0 ms | 204 KB | Output is correct |
3 | Correct | 1 ms | 204 KB | Output is correct |
4 | Correct | 0 ms | 204 KB | Output is correct |
5 | Correct | 0 ms | 204 KB | Output is correct |
6 | Incorrect | 1 ms | 204 KB | WA in grader: Instruction with no inputs |
7 | Halted | 0 ms | 0 KB | - |
# | Verdict | Execution time | Memory | Grader output |
---|---|---|---|---|
1 | Correct | 1 ms | 204 KB | Output is correct |
2 | Correct | 1 ms | 204 KB | Output is correct |
3 | Correct | 0 ms | 204 KB | Output is correct |
4 | Correct | 1 ms | 204 KB | Output is correct |
5 | Correct | 1 ms | 204 KB | Output is correct |
6 | Correct | 1 ms | 204 KB | Output is correct |
7 | Correct | 1 ms | 204 KB | Output is correct |
8 | Correct | 1 ms | 204 KB | Output is correct |
9 | Correct | 1 ms | 204 KB | Output is correct |
10 | Correct | 1 ms | 204 KB | Output is correct |
11 | Correct | 1 ms | 204 KB | Output is correct |
12 | Correct | 1 ms | 204 KB | Output is correct |
13 | Correct | 1 ms | 204 KB | Output is correct |
14 | Correct | 0 ms | 204 KB | Output is correct |
15 | Correct | 1 ms | 204 KB | Output is correct |
16 | Correct | 1 ms | 204 KB | Output is correct |
17 | Correct | 0 ms | 204 KB | Output is correct |
18 | Correct | 1 ms | 204 KB | Output is correct |
19 | Correct | 1 ms | 204 KB | Output is correct |
20 | Correct | 0 ms | 204 KB | Output is correct |
21 | Correct | 0 ms | 204 KB | Output is correct |
22 | Correct | 0 ms | 204 KB | Output is correct |
# | Verdict | Execution time | Memory | Grader output |
---|---|---|---|---|
1 | Correct | 0 ms | 204 KB | Output is correct |
2 | Incorrect | 1 ms | 204 KB | WA in grader: Instruction with no inputs |
3 | Halted | 0 ms | 0 KB | - |
# | Verdict | Execution time | Memory | Grader output |
---|---|---|---|---|
1 | Correct | 10 ms | 1100 KB | Output is correct |
2 | Correct | 0 ms | 204 KB | Output is correct |
3 | Correct | 1 ms | 332 KB | Output is correct |
4 | Correct | 2 ms | 332 KB | Output is correct |
5 | Correct | 1 ms | 204 KB | Output is correct |
6 | Correct | 1 ms | 204 KB | Output is correct |
7 | Correct | 7 ms | 684 KB | Output is correct |
8 | Correct | 7 ms | 716 KB | Output is correct |
9 | Correct | 10 ms | 1016 KB | Output is correct |
10 | Correct | 0 ms | 204 KB | Output is correct |
11 | Correct | 1 ms | 204 KB | Output is correct |
# | Verdict | Execution time | Memory | Grader output |
---|---|---|---|---|
1 | Correct | 0 ms | 204 KB | Output is correct |
2 | Correct | 0 ms | 204 KB | Output is correct |
3 | Correct | 1 ms | 204 KB | Output is correct |
4 | Correct | 0 ms | 204 KB | Output is correct |
5 | Correct | 0 ms | 204 KB | Output is correct |
6 | Incorrect | 1 ms | 204 KB | WA in grader: Instruction with no inputs |
7 | Halted | 0 ms | 0 KB | - |