結果

問題 No.2201 p@$$w0rd
ユーザー nono00
提出日時 2023-02-10 01:36:27
言語 C++17
(gcc 13.3.0 + boost 1.87.0)
結果
WA  
実行時間 -
コード長 708 bytes
コンパイル時間 2,012 ms
コンパイル使用メモリ 194,048 KB
最終ジャッジ日時 2025-02-10 11:51:43
ジャッジサーバーID
(参考情報)
judge3 / judge2
このコードへのチャレンジ
(要ログイン)
ファイルパターン 結果
other AC * 21 WA * 3
権限があれば一括ダウンロードができます

ソースコード

diff #

#include <bits/stdc++.h>
using namespace std;
#define rep(i, l, r) for (int i = (int)(l); i < (int)(r); i++)
#define rrep(i, r, l) for (int i = (int)(r); i > (int)(l); i--)
#define all(a) (a).begin(), (a).end()
#define rall(a) (a).rbegin(), (a).rend()

void solve() {
    const int n = 8;
    string s;
    cin >> s;
    
    int num = 0;
    int syn = 0;
    rep(i, 0, n) {
        if (s[i] == 'l' || s[i] == 'o') {
            num++;
        } else if (s[i] == 'a' || s[i] == 's') {
            syn++;
        }
    }

    int ans = ((1 << num) - 1)  * ((1 << syn) - 1) - (num + syn == n);
    cout << ans << endl;
}

int main() {
    int q = 1;
    // cin >> q;
    while (q--) {
        solve();
    }
}
0