Submission
Status:
[PPPPPPPPPP]
Subtask/Task Score:
{100/100}
Score: 100
User: Poon
Problemset: เรียงสตริง
Language: c
Time: 0.001 second
Submitted On: 2025-06-18 19:46:54
#include <stdio.h>
#include <string.h>
int main()
{
char s[200001];
scanf("%s",s);
for(int i=0;i<strlen(s);i++)
{
for(int j=0;j<strlen(s)-i-1;j++)
{
if(s[j]>s[j+1])
{
int temp=s[j];
s[j]=s[j+1];
s[j+1]=temp;
}
}
}
printf("%c ",s[0]);
for(int k=1;k<strlen(s);k++)
{
if(s[k]!=s[k-1])
{
printf("%c ",s[k]);
}
}
}