Submission

Status:

[PPPPPPPPPP]

Subtask/Task Score:

{100/100}

Score: 100

User: koon

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

Language: cpp

Time: 0.003 second

Submitted On: 2025-11-06 17:43:36

#include <iostream>
#include <map>
using namespace std;

int main() {
    ios_base::sync_with_stdio(false);
    cin.tie(0);
    string s;
    cin >> s;
    map<char, int> cnt;
    for (auto i : s) {
        cnt[i]++;
    }
    for (int i = 'A'; i <= 'Z'; i++) {
        if (cnt[i] >= 1) {
            cout << char(i) << " ";
        }
    }
    for (int i = 'a'; i <= 'z'; i++) {
        if (cnt[i] >= 1) {
            cout << char(i) << " ";
        }
    }
    return 0;
}