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"
#include <bits/stdc++.h>
using namespace std;
int a[222][222];
void construct_network(int H, int W, int K) {
auto f = [&](int i, int j) { return i * W + j; };
int last = -1;
for (int i = 0; i < H; i++) {
for (int j = 0; j < W; j++) {
for (int ii = 0; ii < H; ii++) {
int t = K - abs(ii - i);
for (int jj : {j - t, j + t}) {
if (W <= jj || jj < 0 || abs(i - ii) + abs(j - jj) != K) {
continue;
}
int x = add_and({f(i, j), f(ii, jj)});
if (last == -1)
last = x;
else
last = add_or({last, x});
}
}
}
}
}
# | 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... |