#include "vision.h"
#include <bits/stdc++.h>
using namespace std;
void construct_network(int H, int W, int K) {
auto f = [&] (int x, int y) {
return x * W + y;
};
int sz = 0;
for (int i = 0; i < H; i++) {
for (int j = 0; j < W; j++) {
for (int l = 0; l <= K; l++) {
int rest = K - l;
int nx = i + l, ny = j + rest;
if (nx < H && ny < W) {
int x = add_and({f(i, j), f(nx, ny)});
sz++;
}
ny = j - rest;
if (nx < H && ny >= 0) {
int x = add_and({f(i, j), f(nx, ny)});
sz++;
}
}
}
}
vector<int> v;
for (int i = H * W; sz; sz--, i++) v.push_back(i);
add_or(v);
}
# | 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... |