Submission

Status:

[PPPPPPPPPP]

Subtask/Task Score:

{100/100}

Score: 100

User: jackpapho

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

Language: cpp

Time: 0.002 second

Submitted On: 2026-09-30 12:49:10

#include <bits/stdc++.h>
using namespace std;

int main(){
    cin.tie(0);
    ios::sync_with_stdio(0);
    int num[1000] = {};
    string s;
    cin >> s;
    sort(s.begin(), s.end());
    for (int i = 0;i < s.length();i++){
        if (num[s[i]] != 1){
            cout << s[i] << " ";
            num[s[i]] = 1;
        }
    }
    return 0;
}