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<iostream>
#include<vector>
using namespace std;
void construct_network(int H, int W, int K) {
bool pos1filled = false;
pair<int, int> one;
pair<int, int> two;
for(int i=0; i<H*W; i++){
int b = add_not(i);
if(b==0){
if(pos1filled){
two = make_pair(i%W, (i-(i%W))/W);
}
else{
one = make_pair(i%W, (i-(i%W))/W);
pos1filled = true;
}
}
}
if(abs(one.first-two.first)+abs(one.second-two.second)==K){
add_not(0);
}
else{
add_not(1);
}
// 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);
}
# | 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... |