文章

17

粉丝

43

获赞

10

访问

8.9k

头像
字符串排序 题解:别想复杂了,可以直接用sort
P1254 北京大学机试题
发布于2023年7月31日 10:03
阅读数 509

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


int main(){
    char a[20];
    while(cin>>a)
    {
        int len=strlen(a);
        sort(a,a+len);
        cout<<a<<endl;
    }



	return 0;
}

 

登录查看完整内容


登录后发布评论

暂无评论,来抢沙发