Submission
Status:
[PPPPPPPPPP]
Subtask/Task Score:
{100/100}
Score: 100
User: SUN
Problemset: เรียงสตริง
Language: cpp
Time: 0.003 second
Submitted On: 2025-09-20 18:55:42
#include <iostream>
#include <string>
#include <vector>
int main()
{
std::string str;
std::cin >> str;
int n = str.size();
std::vector<int> count(123);
for(int i = 0; i<n; i++)
{
count[str[i]]+= 1;
}
for (int i = 0; i < 123; i++)
{
if(count[i] != 0)
{
if(count[i] > 1)
{
count[i] = 1;
}
std::cout << char(i)<<' ';
}
}
}