結果
| 問題 |
No.2201 p@$$w0rd
|
| コンテスト | |
| ユーザー |
|
| 提出日時 | 2023-03-05 13:28:14 |
| 言語 | C++14 (gcc 13.3.0 + boost 1.87.0) |
| 結果 |
WA
|
| 実行時間 | - |
| コード長 | 990 bytes |
| コンパイル時間 | 1,619 ms |
| コンパイル使用メモリ | 173,104 KB |
| 実行使用メモリ | 6,944 KB |
| 最終ジャッジ日時 | 2024-09-18 01:34:07 |
| 合計ジャッジ時間 | 2,473 ms |
|
ジャッジサーバーID (参考情報) |
judge4 / judge2 |
(要ログイン)
| ファイルパターン | 結果 |
|---|---|
| other | AC * 18 WA * 6 |
ソースコード
#include <bits/stdc++.h>
using namespace std;
int main() {
ios::sync_with_stdio(false);
cin.tie(nullptr);
string s;
cin >> s;
int n = s.size();
set<string> st;
for (int bit = 0; bit < (1 << n); bit++) {
string t = s;
for (int i = 0; i < n; i++) {
if ((bit >> i) & 1) {
if (t[i] == 'l') {
t[i] = '1';
} else if (t[i] == 'o') {
t[i] = '0';
} else if (t[i] == 'a') {
t[i] = '@';
} else if (t[i] == 's') {
t[i] = '$';
}
}
}
bool ok = true;
if (t.find('1') == string::npos && t.find('0') == string::npos) {
ok = false;
}
if (t.find('@') == string::npos && t.find('$') == string::npos) {
ok = false;
}
if (ok) {
st.insert(t);
}
}
cout << st.size() << endl;
}