Submission

Status:

[PPPPPPPPPP]

Subtask/Task Score:

{100/100}

Score: 100

User: samsenpisardmoo69

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

Language: cpp

Time: 0.002 second

Submitted On: 2026-10-02 16:01:35

#include <bits/stdc++.h>
using namespace std;
int main()
{
    string c;
    cin >> c;
    
    sort(c.begin(), c.end());
    int arr[256];
    
    for(int i=0; i<256; i++) arr[i] = 0;
    
    for(int i=0; i<c.length(); i++)
    {
        if(arr[c[i]] == 0) 
        {
            cout << c[i] << " ";
            arr[c[i]] = 1;
        }
    }   
}