Submission

Status:

PPPPPPPPPP

Subtask/Task Score:

100/100

Score: 100

User: KurtCobain

Problemset: อะนาแกรม 1

Language: cpp

Time: 0.003 second

Submitted On: 2025-10-03 14:34:57

#include <iostream>
#include <string>
#include <map>
using namespace std;

int main(){
   // Anagram 1
   string s;
   cin >> s;
   map<char , int> matched = {
   {'A',0},
   {'B',0},
   {'C',0},
   {'D',0},
   {'E',0},
   {'F',0},
   {'G',0},
   {'H',0}
};
   for (char c : s){
    matched[c]++; // Yes
   }
   for (auto p=matched.begin();p!=matched.end();p++){
      cout << p->second << " ";
   }
}