#include <iostream>
#include <vector>
#include "vision.h"
bool valid(int H, int W, int i, int j){
return i >= 0 && i < H && j >= 0 && j < W;
}
void construct_network(int H, int W, int K){
int ind = H*W;
for(int i = 0;i < H;i++){
for(int j = 0;j < W;j++){
std::vector<int> pos;
for(int x = -K; x <= K;x++){
int y = K - abs(x);
if(valid(H, W, i+y, j+x)){
pos.push_back((i+y)*W + j+x);
}
}
pos.push_back(i*W+j);
add_xor(pos);
ind++;
}
}
std::vector<int> vec;
for(int i = H*W+1;i < ind;i+=2){
vec.push_back(i);
}
add_or(vec);
add_not(ind);
}
# |
Verdict |
Execution time |
Memory |
Grader output |
1 |
Incorrect |
0 ms |
256 KB |
on inputs (0, 0), (0, 2), expected 0, but computed 1 |
2 |
Halted |
0 ms |
0 KB |
- |
# |
Verdict |
Execution time |
Memory |
Grader output |
1 |
Incorrect |
0 ms |
256 KB |
on inputs (0, 0), (0, 2), expected 0, but computed 1 |
2 |
Halted |
0 ms |
0 KB |
- |
# |
Verdict |
Execution time |
Memory |
Grader output |
1 |
Incorrect |
0 ms |
256 KB |
on inputs (0, 0), (0, 2), expected 0, but computed 1 |
2 |
Halted |
0 ms |
0 KB |
- |
# |
Verdict |
Execution time |
Memory |
Grader output |
1 |
Incorrect |
0 ms |
256 KB |
on inputs (0, 0), (0, 2), expected 0, but computed 1 |
2 |
Halted |
0 ms |
0 KB |
- |
# |
Verdict |
Execution time |
Memory |
Grader output |
1 |
Incorrect |
1 ms |
384 KB |
on inputs (0, 1), (0, 2), expected 1, but computed 0 |
2 |
Halted |
0 ms |
0 KB |
- |
# |
Verdict |
Execution time |
Memory |
Grader output |
1 |
Incorrect |
0 ms |
256 KB |
on inputs (0, 0), (1, 0), expected 1, but computed 0 |
2 |
Halted |
0 ms |
0 KB |
- |
# |
Verdict |
Execution time |
Memory |
Grader output |
1 |
Incorrect |
3 ms |
1148 KB |
WA in grader: Too many instructions |
2 |
Halted |
0 ms |
0 KB |
- |
# |
Verdict |
Execution time |
Memory |
Grader output |
1 |
Incorrect |
0 ms |
256 KB |
on inputs (0, 0), (0, 2), expected 0, but computed 1 |
2 |
Halted |
0 ms |
0 KB |
- |