HDOJ 2001 ASCII码排序

时间:2023-12-30 17:36:14
#include<set>
#include<iostream>

using namespace std;

int main() {
    char a, b, c;
    while (cin >> a && cin >> b && cin >> c) {
        set<char> ans;
        ans.insert(a);
        ans.insert(b);
        ans.insert(c);
        for (auto it = ans.begin();it != ans.end(); ++it) {
            if (it == ans.begin()) cout << *it;
            else cout <<" "<< *it;
        }
        cout << endl;
    }
    ;
}