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 "vision.h"
using namespace std;
typedef vector<int> vi;
int h,w,k;
int calc_pos(int x, int y) {
return y * w + x;
}
void construct_network(int H, int W, int K) {
h = H; w = W; k = K;
vi all(0);
for (int x = 0; x < W; ++x) {
for (int y = 0; y < H; ++y) {
for (int dx = -K; dx <= K; ++dx) {
int nx = x + dx, ny = y + abs(dx - K);
if (0 <= nx && nx < W && 0 <= ny && ny < H)
all.push_back(add_and({calc_pos(x,y), calc_pos(nx,ny)}));
}
}
}
add_or(all);
}
# | 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... |