#include #include using namespace std; int rez1 = 1, rez2 = 1; void divide(int x, int y, int x1, int y1){ if (rez1 == 0 or rez2 == 0) return; cout << x << " " << y << '\n'; cout.flush(); cin >> rez1; if (rez1 == 0) return; cout << x1 << " " << y1 << '\n'; cout.flush(); cin >> rez2; if (rez2 == 0) return; if (rez1 < 0 and rez2 > 0){ divide(x, y, x1 / 2, y1 / 2); divide(x1 / 2, y, x1, y1 / 2); divide(x, y1 / 2, x1 / 2, y1); divide(x1 / 2, y1 / 2, x1, y1); } } int main(){ divide(0, 0, 200, 200); }