#include <bits/stdc++.h>
#include "vision.h"
using namespace std;
void construct_network(int H, int W, int K) {
// vector<vector<int> > grid;
// grid.resize(H, vector<int>(W));
vector<pair<int, int> > v;
pair<int, int> zero, one;
for (int i = 0; i < H; i++) {
for (int j = 0; j < W; j++) {
// grid[i][j] = 1 - add_not(i * W + j);
if (add_not(i * W + j)) {
zero = {i, j};
v.push_back({i, j});
} else {
one = {i, j};
}
}
}
if (abs(v[0].first - v[1].first) + abs(v[0].second - v[1].second) == K) {
add_not(zero.first * W + zero.second);
return;
} else {
add_not(one.first * W + one.second);
return;
}
}
# |
Verdict |
Execution time |
Memory |
Grader output |
1 |
Incorrect |
0 ms |
348 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 |
0 ms |
348 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 |
0 ms |
348 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 |
0 ms |
348 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 |
0 ms |
348 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 |
348 KB |
Output is correct |
2 |
Incorrect |
0 ms |
348 KB |
on inputs (0, 0), (1, 1), expected 1, but computed 0 |
3 |
Halted |
0 ms |
0 KB |
- |
# |
Verdict |
Execution time |
Memory |
Grader output |
1 |
Incorrect |
1 ms |
1240 KB |
WA in grader: Too many instructions |
2 |
Halted |
0 ms |
0 KB |
- |
# |
Verdict |
Execution time |
Memory |
Grader output |
1 |
Incorrect |
0 ms |
348 KB |
on inputs (0, 1), (0, 2), expected 1, but computed 0 |
2 |
Halted |
0 ms |
0 KB |
- |