#include <bits/stdc++.h>
using namespace std;
int main() {
int n, x1, y1; cin >> x1 >> y1;
int left = x1;
int right = x1;
while (left > 1) {
cout << "examine " << left-1 << ' ' << y1 << endl;
bool x; cin >> x;
if (x == false) break;
left--;
}
while (right < n) {
cout << "examine " << right+1 << ' ' << y1 << endl;
bool 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 left2 = x1;
while (left2 > size) {
cout << "examine " << left2-size << ' ' << y1 << endl;
bool x; cin >> x;
if (x == false) break;
left -= size;
}
int ans_x = left2+2*size;
int high = x1;
while (high > 1) {
cout << "examine " << ans_x << ' ' << high-1 << endl;
bool 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;
int high2 = x1;
while (high2 > size) {
cout << "examine " << ans_x << ' ' << high2-size << endl;
bool x; cin >> x;
if (x == false) break;
high2 -= size;
}
int ans_y = high2+2*size;
cout << "solution " << ans_x << ' ' << ans_y << 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... |