#55189: c++快速另解


11430014@cyhs.tp.edu.tw (櫻月)


#include <bits/stdc++.h>
using namespace std;
int main(){
    int n=0;
    cin>>n;
    vector<pair<int,int>> pos(n); //如下方不用函式就可自己排序
    for (int i=0;i<n;i++){
        int x=0,y=0;
        cin>>x>>y;
        pos[i].first=x;
        pos[i].second=y;
    }
    sort(pos.begin(), pos.end());
    for (auto & [p,q] : pos){
        cout<<p<<" "<<q<<"\n";
    }
    return 0;
}