提交时间:2024-08-19 17:27:36

运行 ID: 167784

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