結果
問題 | No.2201 p@$$w0rd |
ユーザー |
|
提出日時 | 2024-11-09 15:17:48 |
言語 | C++17(gcc12) (gcc 12.3.0 + boost 1.87.0) |
結果 |
AC
|
実行時間 | 2 ms / 2,000 ms |
コード長 | 551 bytes |
コンパイル時間 | 2,157 ms |
コンパイル使用メモリ | 206,820 KB |
実行使用メモリ | 5,248 KB |
最終ジャッジ日時 | 2024-11-09 15:17:52 |
合計ジャッジ時間 | 3,308 ms |
ジャッジサーバーID (参考情報) |
judge3 / judge1 |
(要ログイン)
ファイルパターン | 結果 |
---|---|
other | AC * 24 |
ソースコード
#include <bits/stdc++.h>using namespace std;int main(){string S;cin >> S;set<string> st;for (int i = 0; i < (1 << 8); i++){int a = 0, b = 0;string T = S;for (int j = 0; j < 8; j++){if (((i >> j) & 1) == 1){if (S[j] == 'l'){T[j] = '1';a++;}if (S[j] == 'o'){T[j] = '0';a++;}if (S[j] == 'a'){T[j] = '@';b++;}if (S[j] == 's'){T[j] = '$';b++;}}}if (a > 0 and b > 0 and a + b != 8){st.insert(T);}}cout << st.size() << endl;}