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: 10, Accepted users: 9
Problem 11523 : No special judgement
Problem description
  编写一个程序将n首歌的名字存入到一个指针数组中。把这些歌名按原来的顺序打印出来、按字母表的顺序打印出来。

Input
  第一行是一个整数T,表示有T组数据。每组数据第一行为整数nn<30),表示后面有n首歌名,每首歌名一行,歌名不超过40个字符。

Output
  对于每一组数据,先输出“Case #:”(#为序号,从1起),换行;然后输出排序前的顺序,空一行,输出排序后的结果,换行;每首歌名一行。

Sample Input
2
3
By My Side
A Little Too Not Over You
Try Again
2
I Need You
Change The World
Sample Output
Case 1:
By My Side
A Little Too Not Over You
Try Again
 
A Little Too Not Over You
By My Side
Try Again
Case 2:
I Need You
Change The World
 
Change The World
I Need You
Problem Source
  qshj

Submit   Discuss   Judge Status  Problems  Ranklist 

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