Welcome   HUNAN NORMAL UNIVERSITY ACM/ICPC Judge Online
Home
FAQs
Problem Set
Practices
Online Contests
Major Exercises
OI Special
Judgement
Submit
Online Status
User Ranklist
Users
Register new
Login
Web Links
Hunan Normal University
College of Information Science and Engineering
结构体排序
Time Limit: 1000ms, Special Time Limit:2500ms, Memory Limit:32768KB
Total submit users: 220, Accepted users: 203
Problem 10490 : No special judgement
Problem description
  输入n本书的名称、单价、作者和出版社,按书名升序进行排版和输出(长度均不超过20个字符)。

Input
  输入数据有若干组。每组数据第一行是一个整数n,表示有n本书,接下来每一行是一本书的信息:(名称 单价 作者 出版社)。

Output
  对于每一组数据,输出排序后的结果,输出格式采用左对齐(cout.setf(ios::left))和setw(20),每组数据后空一行。

Sample Input
2
Datastructure 30 Wangweiguang Hunan_University
C++ 26 Liuhong Wuhan_University
3
Hongloumeng 40 Caoxueqing RenMing
Computer_network 50 Liug Hunan_normal
Frontpage 23 Qshj Tsinghua
Sample Output
C++                 26                  Liuhong             Wuhan_University    
Datastructure       30                  Wangweiguang        Hunan_University    
 
Computer_network    50                  Liug                Hunan_normal        
Frontpage           23                  Qshj                Tsinghua            
Hongloumeng         40                  Caoxueqing          RenMing          
Submit   Clarifications   Judge Status  Problems  Ranklist 

HUNAN NORMAL UNIVERSITY ACM/ICPC Judge Online, Version 2010.5.5.final.
Web visits:2052 today,16258779 total, since 2010-05-07