#include "vision.h"
#include <bits/stdc++.h>
using namespace std;
void construct_network(int H, int W, int K){
// columns XOR
for(int i = 0; i < W; i++){
vector<int> hi;
for(int j = 0; j < H; j++) hi.push_back(j*W+i);
add_xor(hi);
}
for(int i = 0; i < W-1; i++){
add_and({H*W+i, H*W+i+1});
}
vector<int> hi2;
for(int i = H*W; i<= H*W+W-1; i++) hi2.push_back(i);
add_or(hi2);
hi2.clear();
for(int i = H*W+W; i<= H*W+2*W-2; i++) hi2.push_back(i);
add_or(hi2);
hi2.clear();
int last = H*W+2*W+1;
// lines XOR
for(int i = 0; i < H; i++){
vector<int> hi;
for(int j = 0; j < W; j++) hi.push_back(i*W+j);
add_xor(hi);
}
for(int i = 0; i < H-1; i++){
add_and({last + i, last +i+1});
}
hi2.clear();
for(int i = last; i<= last+H-1; i++) hi2.push_back(i);
add_or(hi2);
hi2.clear();
for(int i = last+H; i<= last+2*H-2; i++) hi2.push_back(i);
add_or(hi2);
hi2.clear();
// last + 2H +1
add_and({H*W+2*W-1, last +2*H});
add_and({last+2*H-1, H*W +2*W});
add_or({last + 2*H +1, last + 2*H +2});
}
# |
Verdict |
Execution time |
Memory |
Grader output |
1 |
Incorrect |
1 ms |
344 KB |
WA in grader: Instruction with no inputs |
2 |
Halted |
0 ms |
0 KB |
- |
# |
Verdict |
Execution time |
Memory |
Grader output |
1 |
Incorrect |
1 ms |
344 KB |
WA in grader: Instruction with no inputs |
2 |
Halted |
0 ms |
0 KB |
- |
# |
Verdict |
Execution time |
Memory |
Grader output |
1 |
Incorrect |
1 ms |
344 KB |
WA in grader: Instruction with no inputs |
2 |
Halted |
0 ms |
0 KB |
- |
# |
Verdict |
Execution time |
Memory |
Grader output |
1 |
Incorrect |
1 ms |
344 KB |
WA in grader: Instruction with no inputs |
2 |
Halted |
0 ms |
0 KB |
- |
# |
Verdict |
Execution time |
Memory |
Grader output |
1 |
Incorrect |
1 ms |
344 KB |
WA in grader: Instruction with no inputs |
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 |
6 ms |
1132 KB |
on inputs (80, 199), (81, 199), expected 1, but computed 0 |
2 |
Halted |
0 ms |
0 KB |
- |
# |
Verdict |
Execution time |
Memory |
Grader output |
1 |
Incorrect |
1 ms |
344 KB |
WA in grader: Instruction with no inputs |
2 |
Halted |
0 ms |
0 KB |
- |