• C++编译器被禁止用gets
#include<bits/stdc++.h>
using namespace std;

int main()
{
    char solve[1030]={0};

    while( cin.getline(solve,1030) )
    {
        int Len=strlen( solve );
        vector<int> temp( Len );

        for( int i=0; i<Len; ++i )
        {
            temp[i]=solve[i];
        }

        sort( temp.begin(), temp.end() );
        for( auto num : temp )
        {
            printf("%c", num);
        }
        printf("\n");
        memset( solve, 0, sizeof(solve) );
    }

    //system("pause");
    return 0;
}