字串的连接最长路径查找C++

字串的连接最长路径查找

http://www.nowcoder.com/questionTerminal/5af18ba2eb45443aa91a11e848aa6723

#include<iostream>
#include<algorithm>
#include<vector>
#include<string>
using namespace std;
int main()
{
    int n;
    vector<string> s;
    string tmp;
    while(cin>>n)
    {
        for(int i=0;i<n;i++)
        {
            cin>>tmp;
            s.push_back(tmp);
        }
        sort(s.begin(),s.end());

    }
    for(auto x:s) cout<<x<<endl;

    return 0;
}
全部评论

相关推荐

点赞 评论 收藏
分享
牛客83265014...:完了,连现在都没开始面,13号投的是不是晚了
秋招的第一个offer,...
点赞 评论 收藏
分享
评论
53
4
分享

创作者周榜

更多
牛客网
牛客网在线编程
牛客网题解
牛客企业服务