#include "vision.h"
#include <bits/stdc++.h>
#define pb push_back
using namespace std;
void construct_network(int H, int W, int K){
int row=-1;
int l=0;
int h=H-1;
vector<int> names(W*H);
for(int i=0;i<H;i++){
for(int j=0;j<W;j++){
names.pb(i*W+j);
}
}
while(l<h){
vector<int> ask;
int m=(l+h)/2;
ask.insert(ask.begin(),names.begin()+l*W,names.begin()+m*W+1);
if(add_or(ask)==1){
h=m;
}else{
l=m+1;
}
}
//cout<<l<<" ";
row=l;
l=0;
h=W-1;
int col=-1;
while(l<h){
vector<int> ask;
int m=(l+h)/2;
ask.insert(ask.begin(),names.begin()+row*W+l,names.begin()+row*W+m);
if(add_or(ask)==1){
h=m;
}else{
l=m+1;
}
}
//cout<<l<<" ";
col=l;
vector<int> ask;
for(int i=0;i<H;i++){
for(int j=0;j<W;j++){
int dist=abs(i-row)+abs(j-col);
if(dist==K){
ask.pb(i*W+j);
}
}
}
add_or(ask);
}
# |
결과 |
실행 시간 |
메모리 |
Grader output |
1 |
Correct |
1 ms |
212 KB |
Output is correct |
2 |
Incorrect |
1 ms |
212 KB |
on inputs (0, 0), (0, 1), expected 0, but computed 1 |
3 |
Halted |
0 ms |
0 KB |
- |
# |
결과 |
실행 시간 |
메모리 |
Grader output |
1 |
Correct |
1 ms |
212 KB |
Output is correct |
2 |
Incorrect |
1 ms |
212 KB |
on inputs (0, 0), (0, 1), expected 0, but computed 1 |
3 |
Halted |
0 ms |
0 KB |
- |
# |
결과 |
실행 시간 |
메모리 |
Grader output |
1 |
Correct |
1 ms |
212 KB |
Output is correct |
2 |
Incorrect |
1 ms |
212 KB |
on inputs (0, 0), (0, 1), expected 0, but computed 1 |
3 |
Halted |
0 ms |
0 KB |
- |
# |
결과 |
실행 시간 |
메모리 |
Grader output |
1 |
Correct |
1 ms |
212 KB |
Output is correct |
2 |
Incorrect |
1 ms |
212 KB |
on inputs (0, 0), (0, 1), expected 0, but computed 1 |
3 |
Halted |
0 ms |
0 KB |
- |
# |
결과 |
실행 시간 |
메모리 |
Grader output |
1 |
Incorrect |
1 ms |
212 KB |
on inputs (0, 0), (0, 1), expected 1, but computed 0 |
2 |
Halted |
0 ms |
0 KB |
- |
# |
결과 |
실행 시간 |
메모리 |
Grader output |
1 |
Incorrect |
1 ms |
220 KB |
WA in grader: Instruction with no inputs |
2 |
Halted |
0 ms |
0 KB |
- |
# |
결과 |
실행 시간 |
메모리 |
Grader output |
1 |
Incorrect |
4 ms |
820 KB |
on inputs (80, 199), (81, 199), expected 1, but computed 0 |
2 |
Halted |
0 ms |
0 KB |
- |
# |
결과 |
실행 시간 |
메모리 |
Grader output |
1 |
Correct |
1 ms |
212 KB |
Output is correct |
2 |
Incorrect |
1 ms |
212 KB |
on inputs (0, 0), (0, 1), expected 0, but computed 1 |
3 |
Halted |
0 ms |
0 KB |
- |