链接:http://acm.nyist.net/JudgeOnline/problem.php?pid=4

 

水题

#include <iostream>
#include<algorithm>
using namespace std;

int main()
{
    int n;
    cin>>n;
    char data[5];
    while(n--)
    {
        cin>>data;
        sort(data,data+3);
        cout<<data[0];
        for(int i=1;i<3;i++)
            cout<<" "<<data[i];
        cout<<endl;

    }
    return 0;

}