提交时间:2024-08-20 14:50:33
运行 ID: 168927
#include <bits/stdc++.h> using namespace std; long long n,b,c,a[100001]; int main(){ cin >> n; for(int i = 1;i <= n;i++){ cin >> c >> b; a[i] = (c * 100000) + b; } sort(a,a + n); for(int i = 1;i <= n;i++){ long long d = a[i] % 100000; a[i] -= d; cout << a[i] / 100000 << " " << d; if(i != n) cout << endl; } return 0; }