#include <bits/stdc++.h>
using namespace std;
int main() {
int n, x1, y1; cin >> n >> x1 >> y1;
int left = x1;
int right = x1;
while (left > 1) {
cout << "examine " << left-1 << ' ' << y1 << endl;
string x; cin >> x;
if (x == "false") break;
left--;
}
while (right < n) {
cout << "examine " << right+1 << ' ' << y1 << endl;
string x; cin >> x;
if (x == "false") break;
right++;
}
//so now the size is right-left+1
int size=(right-left+1);
x1 = (right+left)/2;
int high = y1;
while (high > 1) {
cout << "examine " << x1 << ' ' << high-1 << endl;
string x; cin >> x;
if (x == "false") break;
high--;
}
int low = high+size-1;
//so now the size is right-left+1
y1 = (high+low)/2;
//so now you have the center of that square, so we bash out the rest
int left2 = x1;
int right2 = x1;
while (left2 > size) {
cout << "examine " << left2-size << ' ' << y1 << endl;
string x; cin >> x;
if (x == "false") break;
left2 -= size;
}
while (right2 <= n-size) {
cout << "examine " << right2+size << ' ' << y1 << endl;
string x; cin >> x;
if (x == "false") break;
right2 += size;
}
int high2 = y1;
int low2 = y1;
while (high2 > size) {
cout << "examine " << x1 << ' ' << high2-size << endl;
string x; cin >> x;
if (x == "false") break;
high2 -= size;
}
while (low2 <= n-size) {
cout << "examine " << x1 << ' ' << low2+size << endl;
string x; cin >> x;
if (x == "false") break;
low2 += size;
}
left2 = (x1-left2)/size;
right2 = (right2-x1)/size;
high2 = (y1-high2)/size;
low2 = (low2-y1)/size;
x1 += (right2-left2)*size;
y1 += (low2-high2)*size;
cout << "solution " << x1 << ' ' << y1 << endl;
}
# | 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... |