3
vector<vector<int>> getSkyline(vector<vector<int>> &buildings) {4
priority_queue<pair<int, int>> pq;6
for (auto b : buildings) {10
sort(co.begin(), co.end());11
int m = unique(co.begin(), co.end()) - co.begin();13
vector<vector<int>> ans;14
for (int i = 0; i < m; i++) {15
while (j < buildings.size() && buildings[j][0] <= co[i])16
pq.push(make_pair(buildings[j][2], buildings[j][1])), j++;17
while (!pq.empty() && pq.top().second <= co[i]) pq.pop();18
int nowH = pq.empty() ? 0 : pq.top().first;20
ans.push_back({co[i], nowH});