本题难度不大,直接利用sort的自定义排序方法即可实现将字符按照ASCII码排序。 #include <iostream> #include <string> #include <algorithm> #include <vector> using namespace std; static bool cmp(const char &a, const char &b) { return a < b; } int main(){ string s; getline(cin, s, '\n'); vector&l...