#include using namespace std; struct Point { int x, y; }; int main(){ ios::sync_with_stdio(false); cin.tie(nullptr); int N; cin >> N; int total = 2 * N; vector pts(total); for (int i = 0; i < total; i++){ cin >> pts[i].x >> pts[i].y; } // ① 先尝试竖直直线方案:按 x 坐标排序(当 x 相同时按 y 排序) { vector temp = pts; sort(temp.begin(), temp.end(), [](const Point &a, const Point &b){ return a.x == b.x ? a.y < b.y : a.x < b.x; }); int x_low = temp[N-1].x, x_high = temp[N].x; if(x_low < x_high){ if(x_low + 1 < x_high){ int t = x_low + 1; cout << 1 << " " << 0 << " " << -t << "\n"; return 0; } else { int t = 2 * x_low + 1; cout << 2 << " " << 0 << " " << -t << "\n"; return 0; } } } // ② 当竖直方案不可行,则必有部分点共享相同 x 值,此时尝试水平直线方案:按 y 坐标排序(当 y 相同时按 x 排序) { vector temp = pts; sort(temp.begin(), temp.end(), [](const Point &a, const Point &b){ return a.y == b.y ? a.x < b.x : a.y < b.y; }); int y_low = temp[N-1].y, y_high = temp[N].y; if(y_low < y_high){ if(y_low + 1 < y_high){ int t = y_low + 1; cout << 0 << " " << 1 << " " << -t << "\n"; return 0; } else { int t = 2 * y_low + 1; cout << 0 << " " << 2 << " " << -t << "\n"; return 0; } } } // ③ 按理来说至少有一种方案必定可行,故此处理论上不会到达 cout << "1 0 0\n"; return 0; }