#include <bits/stdc++.h>
using namespace std;
#include "park.h"
int n;
void dnc(int a, int b){
int lo=0,hi=n,mid;
while(lo<hi){
mid=(lo+hi)/2;
int place[n];
for(int i=0; i<mid; i++) place[i]=1;
for(int i=mid; i<n; i++) place[i]=0;
place[a]=1; place[b]=1;
int x=Ask(a,b,place);
if(x) hi=mid;
else lo=mid+1;
}
if(lo==0) Answer(a,b);
else{
dnc(a,lo-1);
dnc(lo-1,b);
}
}
void Detect(int t, int N){
n=N;
if(t==1){
int place[n];
for(int i=0; i<n; i++) place[i]=0;
for(int i=0; i<n; i++){
for(int j=i+1; j<n; j++){
place[i]=1;
place[j]=1;
int x=Ask(i,j,place);
if(x) Answer(i,j);
place[i]=0;
place[j]=0;
}
}
}
else if(t==2){
dnc(0,n-1);
}
}
int32_t main(){
ios_base::sync_with_stdio(0);
cin.tie(0);
}
Compilation message
/usr/bin/ld: /tmp/ccBEW6p2.o: in function `main':
grader.cpp:(.text.startup+0x0): multiple definition of `main'; /tmp/ccZ7AqZ2.o:park.cpp:(.text.startup+0x0): first defined here
collect2: error: ld returned 1 exit status