题解
2025-05-09 17:32:53
发布于:浙江
0阅读
0回复
0点赞
思路:由于没有给出字符串的长度,所以我们用string输入,然后sort排即可。注意sort要这样写:sort(a.begin(),a.end());
代码:
#include <bits/stdc++.h>
using namespace std;
int main(){
string a;
cin >> a;
sort(a.begin(),a.end());
cout << a;
return 0;
}
这里空空如也
有帮助,赞一个