結果

問題 No.8020 サンシャイン◯崎
ユーザー kya_ski
提出日時 2020-03-30 21:10:19
言語 C++14
(gcc 13.3.0 + boost 1.87.0)
結果
AC  
実行時間 4 ms / 1,000 ms
コード長 341 bytes
コンパイル時間 1,333 ms
コンパイル使用メモリ 165,384 KB
実行使用メモリ 6,944 KB
最終ジャッジ日時 2024-06-23 03:17:15
合計ジャッジ時間 2,218 ms
ジャッジサーバーID
(参考情報)
judge4 / judge3
このコードへのチャレンジ
(要ログイン)
ファイルパターン 結果
other AC * 20
権限があれば一括ダウンロードができます

ソースコード

diff #

#include <bits/stdc++.h>
using namespace std;
const char ch[5] = {'Y', 'E', 'A', 'H', '!'};

int main() {
    string s;
    cin >> s;
    
    auto f = [&] (char x) {
        int res = 0;
        for (const char &c : s) res += (c == x);
        return res;
    };
    
    for (int i = 0; i < 5; i++) cout << f(ch[i]) << ' ';
    return 0;
}
0