結果

問題 No.1367 文字列門松
ユーザー sten_sansten_san
提出日時 2021-01-29 21:34:38
言語 C++17
(gcc 13.3.0 + boost 1.87.0)
結果
WA  
実行時間 -
コード長 885 bytes
コンパイル時間 1,952 ms
コンパイル使用メモリ 192,512 KB
最終ジャッジ日時 2025-01-18 08:58:11
ジャッジサーバーID
(参考情報)
judge5 / judge3
このコードへのチャレンジ
(要ログイン)
ファイルパターン 結果
other AC * 20 WA * 7
権限があれば一括ダウンロードができます

ソースコード

diff #

#include <bits/stdc++.h>
using namespace std;

struct uns_t {} uns;
template <typename Element, typename Head, typename ...Args>
auto vec(Element init, Head arg, Args ...args) {
    if constexpr (sizeof...(Args) == 0) return std::vector(arg, init);
    else return std::vector(arg, vec(init, args...));
}
template <typename Element, typename Head, typename ...Args>
auto vec(uns_t, Head arg, Args ...args) {
    return vec(Element(), arg, args...);
}

int main() {
    int count[CHAR_MAX + 1] = {};
    count['k'] = 1;
    count['a'] = 2;
    count['d'] = 1;
    count['o'] = 1;
    count['m'] = 1;
    count['t'] = 1;
    count['s'] = 1;
    count['u'] = 1;

    string s; cin >> s;
    for (auto c : s) {
        --count[c];
    }

    for (auto e : count) {
        if (e < 0) {
            cout << "No" << endl;
            return 0;
        }
    }

    cout << "Yes" << endl;
}

0