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"
void construct_network(int H, int W, int K) {
/*
std::vector<int> Ns;
Ns = {0, 1};
int a = add_and(Ns);
Ns = {0, a};
int b = add_or(Ns);
Ns = {0, 1, b};
int c = add_xor(Ns);
add_not(c);
* */
int r1 = -1, c1 = -1, r2 = -1, c2 = -1;
for(int i = 0; i < H; i++){
for(int j = 0; j < W; j++){
int cord = i*W+j;
if(add_not(cord) == 0){
if(r1 == -1) r1 = i, c1 = j;
else r2 = i, c2 = j;
}
}
if(r2 != -1) break;
}
int dist = abs(r1-r2) + abs(c1-c2);
if(dist == K) add_not(0);
else add_not(1);
}
# | 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... |