Problem L: STL——字符串排序
来源:互联网 发布:淘宝音乐 编辑:程序博客网 时间:2024/06/05 02:19
HomeWeb BoardProblemSetStandingStatusStatistics
Submit: 3482 Solved: 1666
[Submit][Status][Web Board]
[Submit][Status][Web Board]
Problem L: STL——字符串排序
Time Limit: 1 Sec Memory Limit: 128 MBSubmit: 3482 Solved: 1666
[Submit][Status][Web Board]
Description
对N个字符串排序。
0<N<=50000。每个字符串长度不超过50000,所有字符串长度总和不超过1000000。
Input
第一行读入N。
后面N行,每行一个字符串(只包含字母)。
Output
输出共N行,按字典序从小到大输出。
Sample Input
5bcdefqwertyuiphdjfasdfghjklzzzzz
Sample Output
asdfghjklzzzzbcdefqwertyuiphdjfz
HINT
用STL的string容易解决。
Append Code
한국어< 中文 فارسی English ไทย
All Copyright Reserved 2010-2011 SDUSTOJ TEAM
GPL2.0 2003-2011HUSTOJ Project TEAM
Anything about the Problems, Please Contact Admin:admin
#include <iostream>#include <vector>#include <string>#include <algorithm>using namespace std;int main(){ int N; cin >> N; vector <string> p; for(int i = 0; i < N; i++) { string t; cin >> t; p.push_back(t); } sort(p.begin(),p.end()); vector <string> :: iterator ite; for(ite = p.begin(); ite != p.end(); ite++) cout << *ite<< endl;}
0 0
- Problem L: STL——字符串排序
- Problem L: STL——字符串排序
- Problem : STL——字符串排序
- 动态规划—Problem L
- 动态规划——problem l
- L - Registration system——STL库函数
- Problem : STL——字典
- Problem : STL——水果店
- 《ACM程序设计》-Problem-L-字符串反转输出
- problem 22 字符串排序
- STL对字符串排序
- Problem L
- Problem L
- Problem L
- Problem-L
- Problem L
- Problem L
- Problem L
- 详解僵尸进程和孤儿进程
- 读取properties文件
- Python的if-判断
- 关于父类析构函数为什么要定义为虚函数_boolan_第二门课_第一周
- [kaggle实战] Digit Recognizer -- 从KNN,LR,SVM,RF到深度学习
- Problem L: STL——字符串排序
- MySQL优化
- 腾讯云Ubuntu配置部署步骤
- jQuery插件开发初步练习
- Python-while循环
- 2017SDUT期末机试——素数链表
- 1
- android -- 蓝牙 bluetooth (四)OPP文件传输
- spark on yarn运行产生缺jar包错误及解决办法