링크 : https://www.acmicpc.net/problem/11650
#include <iostream>
#include <vector>
#include <algorithm>
using namespace std;
int main() {
vector<vector<int>> v;
int num = 0;
cin >> num;
for(int i = 0; i < num; i++){
int a = 0, b = 0;
cin >> a >> b;
v.push_back({a,b});
}
sort(v.begin(), v.end());
for(int i = 0; i < num; i++){
cout << v[i][0] << " " << v[i][1] << '\n';
}
return 0;
}