想像一下…
你聽老師的話,開始讀高手的程式碼——也許是比賽的官方解答,也許是排行榜第一名的提交。滿懷期待點開,看到的是這樣的東西:
#include <bits/stdc++.h>
using namespace std;
#define SZ(x) (int)((x).size())
using pii = pair<int, int>;
int main() {
ios::sync_with_stdio(false);
cin.tie(nullptr);
int n;
cin >> n;
vector<pii> v(n);
for (auto &[a, b] : v) cin >> a >> b;
sort(v.begin(), v.end());
for (auto [a, b] : v) cout << a << ' ' << b << '\n';
return 0;
}