Problem M: Permutation - Sorting Pairs

"
Time Limit $1$ 秒/Second(s) Memory Limit $512$ 兆字节/Megabyte(s)
提交总数 $456$ 正确数量 $395$
裁判形式 标准裁判/Standard Judge 我的状态 尚未尝试
难度 分类标签 STL 排序

Sorting Pairs Write a program which print coordinates (xi,yi) of given n points on the plane by the following criteria.

 first by x-coordinate in case of a tie, by y-coordinate

The input is given in the following format. 

n

x0 y0 

x1 y1

 : 

xn−1 yn−1

 In the first line, the number of points n is given. In the following n lines, coordinates of each point are given.

Print coordinate of given points in order.
5
4 7
5 5
2 3
6 8
2 1
2 1
2 3
4 7
5 5
6 8

1≤n≤100,000

 −1,000,000,000≤xi,yi≤1,000,000,000