#include #include #include #include #include using namespace std; int ask(int x, int y) { cout << x << " " << y << "\n"; cout.flush(); int k; cin >> k; return k; } int main() { int l = 0, r = 199, md, answ; for (int i = 0; i < 200; i++) { l = 0; r = 199; while (l < r) { md = (l + r) / 2; answ = ask(i, md); if (answ == 0) return 0; if (answ > 0) { r = md - 1; } else { l = md + 1; } } } return 0; }