# | Submission time | Handle | Problem | Language | Result | Execution time | Memory |
---|---|---|---|---|---|---|---|
1026747 | 2024-07-18T10:28:43 Z | Zicrus | Vision Program (IOI19_vision) | C++17 | 6 ms | 1260 KB |
#include <bits/stdc++.h> #include "vision.h" using namespace std; typedef long long ll; vector<int> distIdVec(vector<int> xId, int W, int K) { int sameX = add_xor(xId); vector<int> distXId; for (int xOffset = 0; xOffset <= K && xOffset < W; xOffset++) { vector<int> offsetId; for (int xPos = 0; xPos < W - xOffset; xPos++) { offsetId.push_back(add_and({xId[xPos], xOffset == 0 ? sameX : xId[xPos + xOffset]})); } distXId.push_back(add_or(offsetId)); } return distXId; } void construct_network(int H, int W, int K) { vector<int> yId(H); for (int i = 0; i < H; i++) { vector<int> r; for (int j = 0; j < W; j++) { r.push_back(W * i + j); } yId[i] = add_or(r); } vector<int> xId(H); for (int i = 0; i < W; i++) { vector<int> c; for (int j = 0; j < H; j++) { c.push_back(W * j + i); } xId[i] = add_or(c); } vector<int> distXId = distIdVec(xId, W, K); vector<int> distYId = distIdVec(yId, H, K); vector<int> kAtXPosId; for (int x = 0; x <= K && x < distXId.size(); x++) { if (K-x >= distYId.size()) continue; kAtXPosId.push_back(add_and({distXId[x], distYId[K-x]})); } add_or(kAtXPosId); }
Compilation message
# | Verdict | Execution time | Memory | Grader output |
---|---|---|---|---|
1 | Incorrect | 1 ms | 344 KB | on inputs (0, 0), (0, 2), expected 0, but computed 1 |
2 | Halted | 0 ms | 0 KB | - |
# | Verdict | Execution time | Memory | Grader output |
---|---|---|---|---|
1 | Incorrect | 1 ms | 344 KB | on inputs (0, 0), (0, 2), expected 0, but computed 1 |
2 | Halted | 0 ms | 0 KB | - |
# | Verdict | Execution time | Memory | Grader output |
---|---|---|---|---|
1 | Incorrect | 1 ms | 344 KB | on inputs (0, 0), (0, 2), expected 0, but computed 1 |
2 | Halted | 0 ms | 0 KB | - |
# | Verdict | Execution time | Memory | Grader output |
---|---|---|---|---|
1 | Incorrect | 1 ms | 344 KB | on inputs (0, 0), (0, 2), expected 0, but computed 1 |
2 | Halted | 0 ms | 0 KB | - |
# | Verdict | Execution time | Memory | Grader output |
---|---|---|---|---|
1 | Runtime error | 0 ms | 348 KB | Execution killed with signal 6 |
2 | Halted | 0 ms | 0 KB | - |
# | Verdict | Execution time | Memory | Grader output |
---|---|---|---|---|
1 | Correct | 0 ms | 348 KB | Output is correct |
2 | Correct | 1 ms | 344 KB | Output is correct |
3 | Correct | 1 ms | 348 KB | Output is correct |
4 | Correct | 2 ms | 604 KB | Output is correct |
5 | Correct | 2 ms | 860 KB | Output is correct |
6 | Correct | 3 ms | 984 KB | Output is correct |
7 | Correct | 2 ms | 984 KB | Output is correct |
8 | Runtime error | 1 ms | 604 KB | Execution killed with signal 6 |
9 | Halted | 0 ms | 0 KB | - |
# | Verdict | Execution time | Memory | Grader output |
---|---|---|---|---|
1 | Correct | 6 ms | 1260 KB | Output is correct |
2 | Correct | 1 ms | 344 KB | Output is correct |
3 | Correct | 1 ms | 348 KB | Output is correct |
4 | Runtime error | 1 ms | 604 KB | Execution killed with signal 6 |
5 | Halted | 0 ms | 0 KB | - |
# | Verdict | Execution time | Memory | Grader output |
---|---|---|---|---|
1 | Incorrect | 1 ms | 344 KB | on inputs (0, 0), (0, 2), expected 0, but computed 1 |
2 | Halted | 0 ms | 0 KB | - |