Problem 2619 --Permutation - Sorting Pairs

2619: Permutation - Sorting Pairs

"
Time Limit $1$ 秒/Second(s) Memory Limit $512$ 兆字节/Megabyte(s)
提交总数 $268$ 正确数量 $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

推荐代码 查看2619 所有题解 上传题解视频得图灵币

本题记录 用 户(点击查看用户) 运行号(点击购买题解) 时 间
算法最快[$0 $ms] 非常烧饼 817753 2022-03-09 07:57:08
内存最少[$1120 $KB] 空城花惊落 946169 2023-03-12 23:29:49
第一AC 计爱玲 281869 2018-10-07 16:16:16
第一挑战 计爱玲 281869 2018-10-07 16:16:16

赛题来源/所属竞赛 会津大学《C++ Programming II》 C++程序设计(高级)

竞赛编号 竞赛名称 竞赛时间 访问比赛
1797 2023-2024-2学期<计算机专业竞赛实训> 第1周练习:STL基础和高精度计算【22计算机】 2024-02-26 00:00:00 请登录
1737 2022-2023-2学期<计算机专业竞赛实训> 第3周练习:STL基础:string/高精度计算【21计算机12345】 2023-03-07 07:00:00 请登录
1681 2021-2022-2学期<算法分析与设计> 第2周练习:STL算法:string/高精度计算 2022-02-28 08:00:00 请登录
1212 2018-2019-1学期安徽科技学院程序设计周赛 2018-10-28 18:00:00 请登录