Submission

Status:

[PPPPPPPPPP]

Subtask/Task Score:

{100/100}

Score: 100

User: Krovmoroz

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

Language: cpp

Time: 0.003 second

Submitted On: 2025-11-06 09:27:04

#include <bits/stdc++.h>
using namespace std;

string sorting(string a) {
  set<char> s;
  string t;
  for (char c:a) s.insert(c);
  for (char c:s) (t += c,t += ' ');
  return t;
}
int main() {
  ios::sync_with_stdio(false); cin.tie(nullptr);
  string a,b;
  cin >> a >> b;
  cout << sorting(a) << "\n"  << sorting(b);
}