[백준/C++] 11650 좌표 정렬하기2 11651 좌표 정렬하기2 #include using namespace std; bool compare(pair a, pair b) { if (a.second == b.second) return a.first > n; for (int i = 0; i > x >> y; n_arr.push_back({x, y}); } sort(n_arr.begin(), n_arr.end(),compare); fo.. Study/Baekjoon 2024.02.21
[백준/C++] 11650 좌표 정렬하기 11650 좌표 정렬하기 #include using namespace std; int main() { ios_base::sync_with_stdio(false); cin.tie(NULL); cout.tie(NULL); int n; vector n_arr; cin >> n; for (int i = 0; i > x >> y; n_arr.push_back({x, y}); } sort(n_arr.begin(), n_arr.end()); for (auto i : n_arr) { cout Study/Baekjoon 2024.02.21