#include "vision.h"
#include <bits/stdc++.h>
using namespace std;
void construct_network(int n, int m, int k) {
vector <int> cand;
int l = 0,r = n*m - 1;
while(l != r){
int mij = (l + r)/2;
for(int i = l;i < mij;i++){
cand.push_back(i);
}
if(add_or(cand) == 1){
r = mij;
}else l = mij + 1;
}
int pos1 = l;
l = 0,r = n*m - 1;
while(l != r){
int mij = (l + r)/2;
for(int i = l;i < mij;i++){
cand.push_back(n*m - 1 - i);
}
if(add_or(cand) == 1){
r = mij;
}else l = mij + 1;
}
int pos2 = r;
int x1 = pos1/m,y1 = pos1%m;
int x2 = pos2/m,y2 = pos2%m;
if(abs(x1 - y1) + abs(x2 - y2) == k){
add_or({pos1});
}else{
add_not(add_or({pos1}));
}
}
# |
Verdict |
Execution time |
Memory |
Grader output |
1 |
Incorrect |
0 ms |
344 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 |
344 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 |
344 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 |
344 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 |
1 ms |
348 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 |
Correct |
0 ms |
348 KB |
Output is correct |
2 |
Incorrect |
0 ms |
348 KB |
on inputs (0, 0), (0, 1), expected 0, but computed 1 |
3 |
Halted |
0 ms |
0 KB |
- |
# |
Verdict |
Execution time |
Memory |
Grader output |
1 |
Incorrect |
4 ms |
5768 KB |
WA in grader: Too many inputs |
2 |
Halted |
0 ms |
0 KB |
- |
# |
Verdict |
Execution time |
Memory |
Grader output |
1 |
Incorrect |
0 ms |
344 KB |
on inputs (0, 1), (0, 2), expected 1, but computed 0 |
2 |
Halted |
0 ms |
0 KB |
- |