#include<bits/stdc++.h>
using namespace std;
#include "vision.h"
void construct_network(int H, int W, int K) {
vector<int> row, col;
for(int i = 0; i < H; i++){
vector<int> v;
for(int j = 0; j < W; j++)
v.push_back(i*W + j);
if(add_or(v)) row.push_back(i);
}
for(int j = 0; j < W; j++){
vector<int> v;
for(int i = 0; i < H; i++)
v.push_back(i*W + j);
if(add_or(v)) col.push_back(j);
}
vector<pair<int, int>> black;
for(auto x: row){
for(auto y: col){
if(!add_not(x*W + y))
black.push_back({x, y});
}
}
int d = abs(black[0].first - black[1].first) + abs(black[0].second - black[1].second);
if(d != K){
add_xor({0, 0});
}
else{
add_or({black[0].first*W + black[0].second, black[0].first*W + black[0].second});
}
}
# |
Verdict |
Execution time |
Memory |
Grader output |
1 |
Runtime error |
0 ms |
340 KB |
Execution killed with signal 11 |
2 |
Halted |
0 ms |
0 KB |
- |
# |
Verdict |
Execution time |
Memory |
Grader output |
1 |
Runtime error |
0 ms |
340 KB |
Execution killed with signal 11 |
2 |
Halted |
0 ms |
0 KB |
- |
# |
Verdict |
Execution time |
Memory |
Grader output |
1 |
Runtime error |
0 ms |
340 KB |
Execution killed with signal 11 |
2 |
Halted |
0 ms |
0 KB |
- |
# |
Verdict |
Execution time |
Memory |
Grader output |
1 |
Runtime error |
0 ms |
340 KB |
Execution killed with signal 11 |
2 |
Halted |
0 ms |
0 KB |
- |
# |
Verdict |
Execution time |
Memory |
Grader output |
1 |
Runtime error |
1 ms |
468 KB |
Execution killed with signal 11 |
2 |
Halted |
0 ms |
0 KB |
- |
# |
Verdict |
Execution time |
Memory |
Grader output |
1 |
Runtime error |
1 ms |
340 KB |
Execution killed with signal 11 |
2 |
Halted |
0 ms |
0 KB |
- |
# |
Verdict |
Execution time |
Memory |
Grader output |
1 |
Incorrect |
2 ms |
1360 KB |
WA in grader: Too many instructions |
2 |
Halted |
0 ms |
0 KB |
- |
# |
Verdict |
Execution time |
Memory |
Grader output |
1 |
Runtime error |
0 ms |
340 KB |
Execution killed with signal 11 |
2 |
Halted |
0 ms |
0 KB |
- |