Submission
Status:
[PPPPPPPPPP]
Subtask/Task Score:
{100/100}
Score: 100
User: Nitro_Legacy
Problemset: เรียงสตริง
Language: cpp
Time: 0.002 second
Submitted On: 2026-09-24 15:42:10
#include <bits/stdc++.h>
using namespace std;
int main(){
string s;
cin >> s;
int n = s.size();
set<char> ans1, ans2;
for (int i = 0; i < n; i++){
if (s[i] < 97){
ans1.insert(s[i]);
} else {
ans2.insert(s[i]);
}
}
for (auto& x : ans1) {
cout << x << " ";
}
for (auto& x : ans2) {
cout << x << " ";
}
return 0;
}