#include <bits/extc++.h>
using namespace std;
typedef long long ll;
int main(){
ll n,x0,y0;
cin>>n>>x0>>y0;
ll l,r;
ll lo,hi,mid;
string s;
lo=1; hi=x0;
while(lo<hi){
mid=(lo+hi)/2;
cout<<"examine "<<mid<<" "<<y0<<endl;
cin>>s;
if(s=="true") hi=mid; else lo=mid+1;
}
l=lo;
lo=x0; hi=n;
while(lo<hi){
mid=(lo+hi+1)/2;
cout<<"examine "<<mid<<" "<<y0<<endl;
cin>>s;
if(s=="true") lo=mid; else hi=mid-1;
}
r=lo;
ll w=r-l+1;
ll M;
int row_par;
if(w%2==0){
M=w/2;
row_par=1;
} else {
M=w/3;
row_par=0;
}
ll X_min=l-row_par*M;
ll y_low;
lo=1; hi=n;
while(lo<hi){
mid=(lo+hi)/2;
cout<<"examine "<<l<<" "<<mid<<endl;
cin>>s;
if(s=="true") hi=mid; else lo=mid+1;
}
y_low=lo;
ll Y_min=y_low-row_par*M;
ll xc=X_min+2*M+M/2;
ll yc=Y_min+2*M+M/2;
cout<<"solution "<<xc<<" "<<yc<<endl;
return 0;
}
# | Verdict | Execution time | Memory | Grader output |
---|
Fetching results... |
# | Verdict | Execution time | Memory | Grader output |
---|
Fetching results... |
# | Verdict | Execution time | Memory | Grader output |
---|
Fetching results... |
# | Verdict | Execution time | Memory | Grader output |
---|
Fetching results... |
# | Verdict | Execution time | Memory | Grader output |
---|
Fetching results... |
# | Verdict | Execution time | Memory | Grader output |
---|
Fetching results... |
# | Verdict | Execution time | Memory | Grader output |
---|
Fetching results... |
# | Verdict | Execution time | Memory | Grader output |
---|
Fetching results... |
# | Verdict | Execution time | Memory | Grader output |
---|
Fetching results... |
# | Verdict | Execution time | Memory | Grader output |
---|
Fetching results... |