C++简洁代码:

字串的连接最长路径查找

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

C++简洁代码:

#include<bits/stdc++.h>
using namespace std;

int main() {
    int n; cin >> n;
    vector<string> res(n);
    for(int i = 0; i < n; i ++) cin >> res[i];
    sort(res.begin(), res.end());
    for(string s : res) cout << s << endl;
    return 0;
}
全部评论
使用 multiset
点赞 回复 分享
发布于 2022-09-11 22:43 福建
sort
点赞 回复 分享
发布于 2021-09-14 15:50

相关推荐

爱吃肉的伊登在写日记:好棒,27届简历能做成这个样子,但是第一个项目感觉cover住难度还是不小的,特别是二面的时候肯定要对分布式系统设计这一块儿有高出正常面试者的水平才行
点赞 评论 收藏
分享
评论
25
3
分享

创作者周榜

更多
牛客网
牛客企业服务