提交时间:2024-08-19 10:34:53

运行 ID: 166280

#include <bits/stdc++.h> using namespace std; int a[100005]; int main() { int n; cin >> n; for (int i = 1; i <= n; i++) { int x, y; cin >> x >> y; a[i] = x * 10 + y; } sort(a + 1, a + n + 1); for (int i = 1; i <= n; i++) cout << a[i] / 10 << " " << a[i] % 10 << endl; return 0; }