主页
题目
状态
排名
OI排名
统计
题解
请登录
常用链接
AOJ考试平台
老赵的Gitee代码
编译原理模拟考试平台
Java技术手册
FCC网站
菜鸟网
在线工具箱
字节豆包GPT
代码可视化
力扣网
牛客网
洛谷
杭电OJ
CodeForce
隐藏编译器
Problem M: Permutation - Sorting Pairs
上一题
正确率: $88.14\%$
下一题
Time Limit
$1$ 秒/Second(s)
Memory Limit
$512$ 兆字节/Megabyte(s)
提交总数
$767$
正确数量
$676$
"
裁判形式
标准裁判/Standard Judge
我的状态
尚未尝试
难度
分类标签
STL
排序
×
为本题添加算法分类(请不要超过5个)
当前分类(单击移除):
STL
排序
单击选择分类:
Description
<p> Sorting Pairs Write a program which print coordinates (xi,yi) of given n points on the plane by the following criteria. </p> <p> first by x-coordinate in case of a tie, by y-coordinate </p>
Input
<p> The input is given in the following format. </p> <p> n </p> <p> x0 y0 </p> <p> x1 y1 </p> <p> : </p> <p> xn−1 yn−1 </p> <p> In the first line, the number of points n is given. In the following n lines, coordinates of each point are given. </p>
Output
Print coordinate of given points in order.
Sample Input
复制
5 4 7 5 5 2 3 6 8 2 1
Sample Output
复制
2 1 2 3 4 7 5 5 6 8
提示
<p> 1≤n≤100,000 </p> <p> −1,000,000,000≤xi,yi≤1,000,000,000 </p>
AOJ
Please Login