#include <iostream>
#include <vector>
#define int long long
using namespace std;
int ml[]={-1,0,1,0};
int mc[]={0,1,0,-1};
vector<pair<int,int>> v;
int n;
bool vf(int l,int c){
if(l>0 && c>0 && l<=n && c<=n){
string s;
cout<<"examine "<<l<<" "<<c<<"\n";
cin>>s;
if(s=="true") return 1;
return 0;
}
return 0;
}
signed main()
{
int i,l,c,cc,cl,j,l1,c1;
cin>>n>>l1>>c1;
for(j=0;j<3;j++){
l=l1;c=c1;
while(true){
cl=l;cc=c;
for(i=30;i>=0;i--){
if(vf(l+ml[j]*(1<<i),c+mc[j]*(1<<i))){
l+=ml[j]*(1<<i);
c+=mc[j]*(1<<i);
}
}
if(l==cl && cc==c) break;
}
v.push_back({l,c});
}
v.push_back({-1,v[1].second-v[2].first+v[0].first});
cout<<"solution "<<(v[0].first+v[2].first)/2<<" "<< (v[1].second+v[3].second)/2;
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... |