Submission
Status:
PPPPPPPPPP
Subtask/Task Score:
100/100
Score: 100
User: thitit
Problemset: อะนาแกรม 1
Language: cpp
Time: 0.004 second
Submitted On: 2026-10-24 20:34:25
#include <bits/stdc++.h>
using namespace std;
#define int long long
signed main () {
cin.tie(0)->sync_with_stdio(false);
string word;
cin >> word;
vector<int> num(8);
for (int i = 0; i < 8; i++) {
num[i] = 0;
}
for (int i = 0; i < word.length(); i++) {
if (word[i] == 'A') {
num[0]++;
} else if (word[i] == 'B') {
num[1]++;
} else if (word[i] == 'C') {
num[2]++;
} else if (word[i] == 'D') {
num[3]++;
} else if (word[i] == 'E') {
num[4]++;
} else if (word[i] == 'F') {
num[5]++;
} else if (word[i] == 'G') {
num[6]++;
} else if (word[i] == 'H') {
num[7]++;
}
}
for (int i = 0; i < 8; i++) {
cout << num[i] << " ";
}
}