Submission

Status:

[PPPPPPPPPP]

Subtask/Task Score:

{100/100}

Score: 100

User: andamanlnwza007

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

Language: cpp

Time: 0.003 second

Submitted On: 2025-10-01 20:03:05

#include <iostream>
#include <algorithm>
#include <string>
#include <vector>
using namespace std;
int main(){
	vector<string> sum;
	string n;
	cin>>n;
	int len = n.length();
	string keep[len];
	for (int i=0; i<len ; i++){
		keep[i] = n.substr(i,1);
	}
	sort(keep , keep+len);
	for (int i =0 ; i<len ;i++){
		if (keep[i] != keep[i-1] or i==0){
			cout<<keep[i];
			if (i!=len-1){
				cout<<" ";
			}
		}
		else {
			continue;
		}
	}
}