Submission
Status:
[PPPPPPPPPP]
Subtask/Task Score:
{100/100}
Score: 100
User: thanainan
Problemset: เรียงสตริง
Language: cpp
Time: 0.003 second
Submitted On: 2025-09-19 16:03:54
#include<iostream>
#include<string>
using namespace std;
int main()
{
string s;
int n;
int c[52]={0};
cin>>s;
n = s.length();
for(int i=0;i<n;i++){
if(int(s[i])<=90){
c[s[i]-65]+=1;
}
else{
c[s[i]-71]+=1;
}
}
for(int i=0;i<52;i++){
if(c[i]>0){
if(i<26){
cout<<char(i+65)<<" ";
}
else{
cout<<char(i+71)<<" ";
}
}
}
}