結果

問題 No.2201 p@$$w0rd
ユーザー 唐揚げが壊わ唐揚げが壊わ
提出日時 2023-02-22 02:10:52
言語 C++17
(gcc 12.3.0 + boost 1.83.0)
結果
AC  
実行時間 2 ms / 2,000 ms
コード長 905 bytes
コンパイル時間 1,573 ms
コンパイル使用メモリ 199,784 KB
実行使用メモリ 4,380 KB
最終ジャッジ日時 2023-09-29 14:10:01
合計ジャッジ時間 3,062 ms
ジャッジサーバーID
(参考情報)
judge11 / judge12
このコードへのチャレンジ
(要ログイン)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 2 ms
4,380 KB
testcase_01 AC 2 ms
4,376 KB
testcase_02 AC 1 ms
4,376 KB
testcase_03 AC 1 ms
4,380 KB
testcase_04 AC 1 ms
4,376 KB
testcase_05 AC 1 ms
4,380 KB
testcase_06 AC 2 ms
4,380 KB
testcase_07 AC 1 ms
4,380 KB
testcase_08 AC 1 ms
4,380 KB
testcase_09 AC 1 ms
4,376 KB
testcase_10 AC 1 ms
4,376 KB
testcase_11 AC 1 ms
4,376 KB
testcase_12 AC 1 ms
4,380 KB
testcase_13 AC 1 ms
4,380 KB
testcase_14 AC 1 ms
4,376 KB
testcase_15 AC 1 ms
4,376 KB
testcase_16 AC 1 ms
4,376 KB
testcase_17 AC 2 ms
4,376 KB
testcase_18 AC 1 ms
4,380 KB
testcase_19 AC 1 ms
4,376 KB
testcase_20 AC 1 ms
4,380 KB
testcase_21 AC 1 ms
4,380 KB
testcase_22 AC 1 ms
4,376 KB
testcase_23 AC 1 ms
4,380 KB
権限があれば一括ダウンロードができます

ソースコード

diff #

#include <bits/stdc++.h>
using namespace std;
using ll = long long;
using ld = long double;
using vll = vector<long long>;
using vvll = vector<vector<long long>>;
using vs = vector<string>;
#define lln \
  ll n;     \
  cin >> n;
#define REP(i, n) for (long long i = 0; i < n; i++)
#define REP2(i, s, e) for (long long i = s; i < e; i++)
#define UNIQUE_VECTOR(v) v.erase(unique(v.begin(), v.end()))
ll gcd(ll x, ll y) { return (x % y) ? gcd(y, x % y) : y; }
ll lcm(ll x, ll y) { return x / gcd(x, y) * y; }

int main() {
  string s;
  cin >> s;
  ll cnt1 = 0, cnt2 = 0, cnt3 = 0;
  REP(i, 8) {
    if (s[i] == 'o' || s[i] == 'l') {
      cnt1++;
    } else if (s[i] == 'a' || s[i] == 's') {
      cnt2++;
    } else {
      cnt3++;
    }
  }
  ll _1 = 1, _2 = 1, _3 = 1;
  REP(i, cnt1) { _1 *= 2; }
  REP(i, cnt2) { _2 *= 2; }
  if (cnt3) _3 = 0;

  cout << max((ll)0, (_1 - 1) * (_2 - 1) - _3) << endl;
}
0