图书价格排序
该比赛已结束,您无法在比赛模式下递交该题目。您可以点击“在题库中打开”以普通模式查看和递交本题。
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.