/* -*- coding: utf-8 -*- * * 2962.cc: No.2962 Sum Bomb Bomber - yukicoder */ #include #include using namespace std; /* constant */ const int MIN_X = -100000000; const int MAX_X = 100000000; const int MIN_Y = -100000000; const int MAX_Y = 100000000; const long long LINF = 1LL << 62; /* typedef */ using ll = long long; /* global variables */ /* subroutines */ ll query(int x, int y) { printf("1 %d %d\n", x, y); fflush(stdout); ll d; scanf("%lld", &d); return d; } /* main */ int main() { int n; scanf("%d", &n); int x0 = MIN_X, x1 = MAX_X; while (x0 + 2 < x1) { int xx0 = (x0 * 2 + x1) / 3; int xx1 = (x0 + x1 * 2) / 3; ll d0 = query(xx0, 0); ll d1 = query(xx1, 0); if (d0 > d1) x0 = xx0; else x1 = xx1; } ll mindx = LINF; int minx = -1; for (int x = x0; x <= x1; x++) { ll d = query(x, 0); if (mindx > d) mindx = d, minx = x; } int y0 = MIN_Y, y1 = MAX_Y; while (y0 + 2 < y1) { int yy0 = (y0 * 2 + y1) / 3; int yy1 = (y0 + y1 * 2) / 3; ll d0 = query(minx, yy0); ll d1 = query(minx, yy1); if (d0 > d1) y0 = yy0; else y1 = yy1; } ll mindy = LINF; int miny = -1; for (int y = y0; y <= y1; y++) { ll d = query(minx, y); if (mindy > d) mindy = d, miny = y; } printf("2 %d %d\n", minx, miny); fflush(stdout); return 0; }