#P1050. 图书价格排序
图书价格排序
Background
图书价格排序
Special for beginners, ^_^
Description
输入 n 本图书的信息(书名、价格),定义结构体存储,按价格从低到高输出书名和价格。
价格相同时,书名字典序小的在前。
Format
Input
第一行:一个整数 n()。 接下来 n 行:每行一个不含空格的书名(长度 ≤ 20)和一个整数价格( 价格 ),用空格分隔。
Output
共 n 行,每行输出书名和价格,用空格分隔。
Samples
3
C++Primer 89
Algorithm 59
Python 75
Algorithm 59
Python 75
C++Primer 89
2
Zoo 50
Apple 50
Apple 50
Zoo 50
Limitation
1s, 1024KiB for each test case.
相关
在下列比赛中: