Skip to content

Instantly share code, notes, and snippets.

@JaeguKim
Created September 10, 2017 03:06
[BOJ 11650]
#define _CRT_SECURE_NO_WARNINGS
#include <cstdio>
#include <algorithm>
#include <vector>
using namespace std;
vector<pair<int, int>> vec;
int main(void) {
int n,x,y;
scanf("%d", &n);
for (int i = 0; i < n; i++) {
scanf("%d%d", &x, &y);
vec.push_back(make_pair(x, y));
}
sort(vec.begin(), vec.end());
for (int i = 0; i < n; i++) {
printf("%d %d\n", vec[i].first, vec[i].second);
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment