题解 | #字符串排序#
字符串排序
https://www.nowcoder.com/practice/5af18ba2eb45443aa91a11e848aa6723
#include <iostream> #include <vector> #include <algorithm> using namespace std; int main() { int n; cin >> n; string str; vector<string> vec; while (cin >> str) { vec.push_back(str); } sort(vec.begin(),vec.end()); for (auto i:vec){ cout << i << endl; } return 0; }#23届找工作求助阵地##14天打卡计划##零基础学习C++#