Submission

Status:

[PPPPPPPPPP]

Subtask/Task Score:

{100/100}

Score: 100

User: pottersk146

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

Language: cpp

Time: 0.004 second

Submitted On: 2026-10-12 19:06:56

#include <bits/stdc++.h>
using namespace std;
int main(){
    ios::sync_with_stdio(false);
    cin.tie(nullptr);
    string s;
    cin>>s;
    sort(s.begin(), s.end());
    for (int i=0; i<s.length(); i++){
        if (i==0||s[i-1]!=s[i]){
            cout<<s[i]<<" ";
        }
    }
    return 0;
}