Submission

Status:

[PPPPPPPPPP]

Subtask/Task Score:

{100/100}

Score: 100

User: Iwannatrycoding2

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

Language: cpp

Time: 0.003 second

Submitted On: 2026-05-26 15:02:14

#include <iostream>
#include <string>

int main(){
  bool abc[52] = {};
  std::string s;
  std::cin >> s;
  for(const char&c : s){
    if(c<'a'){
      abc[c-'A'] = true;
    }else{
      abc[c-'a'+26] = true;
    }
  }

  for(int i=0; i<26; ++i){
    if(abc[i]){
      std::cout << char('A'+i) << ' ';
    }
  }
  for(int i=26; i<52; ++i){
    if(abc[i]){
      std::cout << char('a'+i-26) << ' ';
    }
  }
  return 0;
  /*
 ILOVECOMPUTERJa
 */
}