結果
問題 |
No.2201 p@$$w0rd
|
ユーザー |
![]() |
提出日時 | 2023-02-03 21:23:26 |
言語 | C++17 (gcc 13.3.0 + boost 1.87.0) |
結果 |
AC
|
実行時間 | 2 ms / 2,000 ms |
コード長 | 752 bytes |
コンパイル時間 | 1,920 ms |
コンパイル使用メモリ | 192,512 KB |
最終ジャッジ日時 | 2025-02-10 08:38:40 |
ジャッジサーバーID (参考情報) |
judge5 / judge1 |
(要ログイン)
ファイルパターン | 結果 |
---|---|
other | AC * 24 |
ソースコード
#include <bits/stdc++.h> using namespace std; int main() { ios::sync_with_stdio(false); cin.tie(nullptr); string S; cin >> S; int ans = 0; for(int i = 0; i < (1 << S.size()); i++) { bool flag = true; int a = 0,b = 0,c = 0; for(int j = 0; j < S.size(); j++) { if(1 & (i >> j)) { if(S[j] == 'l' || S[j] == 'o') { b++; } else if(S[j] == 'a' || S[j] == 's') { c++; } else { flag = false; } } else { a++; } } if(a && b && c && flag) ans++; } cout << ans << endl; }