#include<iostream>
#include<vector>
#include<queue>
#include<stack>
#include<algorithm>
#include<limits.h>
#include<math.h>
#include<map>
#include<set>
#include<unordered_map>
#include<unordered_set>
#include<iomanip>
typedef long long ll;
typedef long double ld;
using namespace std;
const int MOD=1e9+7;
//typedef pair<ll,ll>Point;
//typedef pair<ll,ll>Line;
//#define x first
//#define y second
bool arr[19][19];
int n;
bool query(int x,int y){
if(x>=n||y>=n||x<0||y<0)
return false;
cout<<"examine "<<x+1<<" "<<y+1<<endl;
string res;
cin>>res;
return res=="true";
}
/*bool query(int x,int y){
if(x>=n||y>=n||x<0||y<0)
return false;
return arr[x][y]==1;
}*/
int main(){
ios::sync_with_stdio(false);
cout.tie(NULL);
cin.tie(NULL);
for(int x=4;x<19;x++)
for(int y=3;y<18;y++){
if(((x-4)/3+(y-3)/3)%2==0)
arr[x][y]=1;
}
//freopen("input.txt","r",stdin);
//freopen("output.txt","w",stdout);
int x=12,y=12;
n=19;
cin>>n>>x>>y;
x--;y--;
{
int l=x,r=x+1;
while(query(r,y)){
r=l+(r-l)*2;
}
while(l<r-1){
int m=(l+r)/2;
if(query(m,y)){
l=m;
}else{
r=m;
}
}
x=l;
}
{
int l=y,r=y+1;
while(query(x,r)){
r=l+(r-l)*2;
}
while(l<r-1){
int m=(l+r)/2;
if(query(x,m)){
l=m;
}else{
r=m;
}
}
y=l;
}
int size=0;
{
int l=x-1,r=x;
while(query(l,y)){
l=r-(r-l)*2;
}
while(l<r-1){
int m=(l+r)/2;
if(query(m,y)){
r=m;
}else{
l=m;
}
}
size=x-l;
}
while(query(x,y))
x+=size*2;
x-=size*2;
while(query(x,y))
y+=size*2;
y-=size*2;
int offset=2*size-size/2;
cout<<"solution "<<x-offset-1<<" "<<y-offset-1<<"\n";
return 0;
}
# |
Verdict |
Execution time |
Memory |
Grader output |
1 |
Correct |
0 ms |
344 KB |
Output is correct |
2 |
Incorrect |
1 ms |
344 KB |
Incorrect |
3 |
Halted |
0 ms |
0 KB |
- |
# |
Verdict |
Execution time |
Memory |
Grader output |
1 |
Incorrect |
1 ms |
344 KB |
Incorrect |
2 |
Halted |
0 ms |
0 KB |
- |
# |
Verdict |
Execution time |
Memory |
Grader output |
1 |
Incorrect |
1 ms |
344 KB |
Incorrect |
2 |
Halted |
0 ms |
0 KB |
- |
# |
Verdict |
Execution time |
Memory |
Grader output |
1 |
Correct |
0 ms |
344 KB |
Output is correct |
2 |
Incorrect |
0 ms |
344 KB |
Incorrect |
3 |
Halted |
0 ms |
0 KB |
- |
# |
Verdict |
Execution time |
Memory |
Grader output |
1 |
Incorrect |
1 ms |
356 KB |
Incorrect |
2 |
Halted |
0 ms |
0 KB |
- |
# |
Verdict |
Execution time |
Memory |
Grader output |
1 |
Incorrect |
1 ms |
344 KB |
Incorrect |
2 |
Halted |
0 ms |
0 KB |
- |
# |
Verdict |
Execution time |
Memory |
Grader output |
1 |
Incorrect |
0 ms |
344 KB |
Incorrect |
2 |
Halted |
0 ms |
0 KB |
- |
# |
Verdict |
Execution time |
Memory |
Grader output |
1 |
Incorrect |
0 ms |
344 KB |
Incorrect |
2 |
Halted |
0 ms |
0 KB |
- |
# |
Verdict |
Execution time |
Memory |
Grader output |
1 |
Incorrect |
1 ms |
344 KB |
Incorrect |
2 |
Halted |
0 ms |
0 KB |
- |
# |
Verdict |
Execution time |
Memory |
Grader output |
1 |
Incorrect |
1 ms |
344 KB |
Incorrect |
2 |
Halted |
0 ms |
0 KB |
- |