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;
void construct_network(int H, int W, int K) {
int last = 0;
for(int i = 0; i < H; i++)
for(int j = 0; j < W; j++) {
int difx = -K;
while(difx <= K) {
int dify = K - abs(difx);
int ii = i + difx;
int jj = j + dify;
if(ii >= 0 && ii < H && jj >= 0 && jj < W) {
last = add_and({i*W + j, ii*W + jj});
}
difx++;
}
}
vector<int> all;
for(int i = H*W; i <= last; i++) all.push_back(i);
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... |