Submission

Status:

[PPPPPPPPPP]

Subtask/Task Score:

{100/100}

Score: 100

User: thereal_zenitsu10

Problemset: เรียงสตริง

Language: cpp

Time: 0.006 second

Submitted On: 2026-10-15 13:32:19

#include <iostream>
#include <string>
#include <algorithm>
#include <set>

using namespace std;

int main(){
    ios_base::sync_with_stdio(false);
    cin.tie(NULL);

    string s;
    set<char> seen;

    cin>>s;
    sort(s.begin(),s.end());
    for(char i : s){
        if (seen.find(i) == seen.end()) {
            cout << i <<" ";
            seen.insert(i);
        }
    }

    cout<<'\n';
    
    return 0;
}