题解 | 字符串内排序
字符串内排序
https://www.nowcoder.com/practice/cc2291ab56ee4e919efef2f4d2473bac
//KY167 字符串内排序
#include <iostream>
#include <algorithm>
#include <cstring>
using namespace std;
string s;
int main()
{
while(cin>>s){
sort(s.begin(),s.end());
cout<<s<<"\n";
}
return 0;
}
查看7道真题和解析