Submission
Status:
PPPPPPPPPP
Score: 100
User: Cmoss9
Problemset: อะนาแกรม 1
Language: cpp
Time: 0.002 second
Submitted On: 2025-03-31 23:53:33
#include <bits/stdc++.h>
using namespace std;
int main () {
cin.tie(0) -> sync_with_stdio(0);
string s;
cin >> s;
vector<int> v(8,0);
for (auto i : s) {
if (i == 'A') {
v[0]++;
}
if (i == 'B') {
v[1]++;
}
if (i == 'C') {
v[2]++;
}
if (i == 'D') {
v[3]++;
}
if (i == 'E') {
v[4]++;
}
if (i == 'F') {
v[5]++;
}
if (i == 'G') {
v[6]++;
}
if (i == 'H') {
v[7]++;
}
}
for (auto i : v) {
cout << i << ' ';
}
}