#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 |
1 |
Incorrect |
1 ms |
348 KB |
on inputs (0, 0), (0, 1), expected 1, but computed 0 |
2 |
Halted |
0 ms |
0 KB |
- |
# |
Verdict |
Execution time |
Memory |
Grader output |
1 |
Incorrect |
1 ms |
348 KB |
on inputs (0, 0), (0, 1), expected 1, but computed 0 |
2 |
Halted |
0 ms |
0 KB |
- |
# |
Verdict |
Execution time |
Memory |
Grader output |
1 |
Incorrect |
1 ms |
348 KB |
on inputs (0, 0), (0, 1), expected 1, but computed 0 |
2 |
Halted |
0 ms |
0 KB |
- |
# |
Verdict |
Execution time |
Memory |
Grader output |
1 |
Incorrect |
1 ms |
348 KB |
on inputs (0, 0), (0, 1), expected 1, but computed 0 |
2 |
Halted |
0 ms |
0 KB |
- |
# |
Verdict |
Execution time |
Memory |
Grader output |
1 |
Incorrect |
1 ms |
348 KB |
on inputs (0, 0), (0, 1), expected 1, but computed 0 |
2 |
Halted |
0 ms |
0 KB |
- |
# |
Verdict |
Execution time |
Memory |
Grader output |
1 |
Incorrect |
1 ms |
344 KB |
on inputs (0, 0), (0, 1), expected 1, but computed 0 |
2 |
Halted |
0 ms |
0 KB |
- |
# |
Verdict |
Execution time |
Memory |
Grader output |
1 |
Incorrect |
1 ms |
980 KB |
WA in grader: Too many instructions |
2 |
Halted |
0 ms |
0 KB |
- |
# |
Verdict |
Execution time |
Memory |
Grader output |
1 |
Incorrect |
1 ms |
348 KB |
on inputs (0, 0), (0, 1), expected 1, but computed 0 |
2 |
Halted |
0 ms |
0 KB |
- |