标题:给定字符串,重新排列其顺序。
取消只看楼主
ClearningC
Rank: 2
等 级:论坛游民
帖 子:98
专家分:43
注 册:2016-10-26
结帖率:89.47%
已结贴  问题点数:19 回复次数:0 
给定字符串,重新排列其顺序。
Description
Given a list of strings, sort and output them in ascending order(using strcmp).
Input
The first line is an integer n(1 <= n <= 1000), indicating the number of strings. In the following n lines are n strings(no more than 100 characters, contains no space) to be sorted.
Output
The strings in ascending order.
Sample Input
5
ZGW
ZD
CJ
LSC
PB
Sample Output
CJ
LSC
PB
ZD
ZGW
搜索更多相关主题的帖子: 字符串 
2016-12-26 01:38



参与讨论请移步原网站贴子:https://bbs.bccn.net/thread-472919-1-1.html




关于我们 | 广告合作 | 编程中国 | 清除Cookies | TOP | 手机版

编程中国 版权所有,并保留所有权利。
Powered by Discuz, Processed in 1.886294 second(s), 10 queries.
Copyright©2004-2025, BCCN.NET, All Rights Reserved