Submission

Status:

PPPPPPPPPP

Subtask/Task Score:

100/100

Score: 100

User: chillxvtkz

Problemset: อะนาแกรม 1

Language: cpp

Time: 0.003 second

Submitted On: 2026-10-07 22:46:13

#include <bits/stdc++.h>
#define ll long long
#define ct cout << ' '
#define el cout << endl;
using namespace std;
const int mx = 1e9;
const int mn = -1e9;

int x[300];
string s;
int main() {
    ios_base::sync_with_stdio(false);
    cin.tie(NULL);
    cin >> s;
    for (int i = 0; i < s.size(); i++)
    {
        if(s[i]=='A') x['a'] = x['a']+1;
        else if(s[i]=='B') x['b'] = x['b']+1;
        else if(s[i]=='C') x['c'] = x['c']+1;
        else if(s[i]=='D') x['d'] = x['d']+1;
        else if(s[i]=='E') x['e'] = x['e']+1;
        else if(s[i]=='F') x['f'] = x['f']+1;
        else if(s[i]=='G') x['g'] = x['g']+1;
        else if(s[i]=='H') x['h'] = x['h']+1;
    }
    cout << x['a'] << " " << x['b'] <<  ' ' << x['c'] <<  ' ' << x['d'] <<  ' ' << x['e'] <<  ' ' << x['f'] <<  ' ' << x['g'] <<  ' ' << x['h'];
    
    return 0;
}