結果

問題 No.2201 p@$$w0rd
ユーザー achapi
提出日時 2024-11-09 15:17:48
言語 C++17
(gcc 13.3.0 + boost 1.87.0)
結果
AC  
実行時間 4 ms / 2,000 ms
コード長 551 bytes
コンパイル時間 2,006 ms
コンパイル使用メモリ 200,012 KB
最終ジャッジ日時 2025-02-25 03:18:17
ジャッジサーバーID
(参考情報)
judge3 / judge1
このコードへのチャレンジ
(要ログイン)
ファイルパターン 結果
other AC * 24
権限があれば一括ダウンロードができます

ソースコード

diff #

#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;
}
0