#include<iostream> #include<sstream> #include<vector> #include<string> #include<algorithm> using namespace std; int main(void) {     string str;     while(getline(cin, str)){         vector<string> p;         string tmp;                  stringstream ss;         ss << str;         while(ss >> tmp)             p.push_back(tmp);                  sort(p.begin(),p.end());         for(int i=0; i<p.size()-1; i++)             cout << p[i] << ' ';         cout << p[p.size()-1] << endl;     }          return 0; }

相关推荐

06-25 09:33
厦门大学 Java
程序员饺子:现在日常估计没啥hc了,等到八月多估计就慢慢有了。双九✌🏻不用焦虑的
投递快手等公司7个岗位
点赞 评论 收藏
分享
程序员小白条:这比例牛逼,750:1
点赞 评论 收藏
分享
今天 13:50
门头沟学院 Java
点赞 评论 收藏
分享
牛客网
牛客网在线编程
牛客网题解
牛客企业服务