# | Submission time | Handle | Problem | Language | Result | Execution time | Memory |
---|---|---|---|---|---|---|---|
296154 | 2020-09-10T10:56:55 Z | SamAnd | Vision Program (IOI19_vision) | C++17 | 1 ms | 416 KB |
#include "vision.h" #include <bits/stdc++.h> using namespace std; #define fi first #define se second #define m_p make_pair #define all(x) (x).begin(),(x).end() #define sz(x) ((int)(x).size()) typedef long long ll; const int N = 202; int n, m; int z; int a[N * N]; void construct_network(int H, int W, int K) { n = H; m = W; z = n * m; int x1 = -1, y1_ = -1, x2 = -1, y2 = -1; for (int i = 0; i < n; ++i) { for (int j = 0; j < m; ++j) { if (a[z++] = add_not(i * n + j)) { if (x1 == -1) { x1 = i; y1_ = j; } else { x2 = i; y2 = j; } } } } if (abs(x1 - x2) + abs(y1_ - y2) != K) { a[z++] = add_not(x2 * n + y2); } else { a[z++] = add_not(x2 * n + y2); add_not(z - 1); } }
Compilation message
# | Verdict | Execution time | Memory | Grader output |
---|---|---|---|---|
1 | Incorrect | 1 ms | 256 KB | on inputs (0, 1), (0, 2), expected 1, but computed 0 |
2 | Halted | 0 ms | 0 KB | - |
# | Verdict | Execution time | Memory | Grader output |
---|---|---|---|---|
1 | Incorrect | 1 ms | 256 KB | on inputs (0, 1), (0, 2), expected 1, but computed 0 |
2 | Halted | 0 ms | 0 KB | - |
# | Verdict | Execution time | Memory | Grader output |
---|---|---|---|---|
1 | Incorrect | 1 ms | 256 KB | on inputs (0, 1), (0, 2), expected 1, but computed 0 |
2 | Halted | 0 ms | 0 KB | - |
# | Verdict | Execution time | Memory | Grader output |
---|---|---|---|---|
1 | Incorrect | 1 ms | 256 KB | on inputs (0, 1), (0, 2), expected 1, but computed 0 |
2 | Halted | 0 ms | 0 KB | - |
# | Verdict | Execution time | Memory | Grader output |
---|---|---|---|---|
1 | Incorrect | 1 ms | 384 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 | Correct | 1 ms | 384 KB | Output is correct |
2 | Correct | 1 ms | 256 KB | Output is correct |
3 | Incorrect | 1 ms | 416 KB | WA in grader: Invalid index |
4 | Halted | 0 ms | 0 KB | - |
# | Verdict | Execution time | Memory | Grader output |
---|---|---|---|---|
1 | Incorrect | 1 ms | 384 KB | WA in grader: Invalid index |
2 | Halted | 0 ms | 0 KB | - |
# | Verdict | Execution time | Memory | Grader output |
---|---|---|---|---|
1 | Incorrect | 1 ms | 256 KB | on inputs (0, 1), (0, 2), expected 1, but computed 0 |
2 | Halted | 0 ms | 0 KB | - |