This submission is migrated from previous version of oj.uz, which used different machine for grading. This submission may have different result if resubmitted.
#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 |
---|
Fetching results... |
# | Verdict | Execution time | Memory | Grader output |
---|
Fetching results... |
# | Verdict | Execution time | Memory | Grader output |
---|
Fetching results... |
# | Verdict | Execution time | Memory | Grader output |
---|
Fetching results... |
# | Verdict | Execution time | Memory | Grader output |
---|
Fetching results... |
# | Verdict | Execution time | Memory | Grader output |
---|
Fetching results... |
# | Verdict | Execution time | Memory | Grader output |
---|
Fetching results... |
# | Verdict | Execution time | Memory | Grader output |
---|
Fetching results... |