結果

問題 No.2201 p@$$w0rd
ユーザー Kome_soudouKome_soudou
提出日時 2023-02-18 02:24:47
言語 C++14
(gcc 13.2.0 + boost 1.83.0)
結果
AC  
実行時間 2 ms / 2,000 ms
コード長 661 bytes
コンパイル時間 1,550 ms
コンパイル使用メモリ 166,832 KB
実行使用メモリ 4,380 KB
最終ジャッジ日時 2023-09-26 23:02:10
合計ジャッジ時間 2,956 ms
ジャッジサーバーID
(参考情報)
judge15 / judge12
このコードへのチャレンジ
(要ログイン)

テストケース

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

ソースコード

diff #

#include <bits/stdc++.h>
using namespace std;

int main()
{
	string s;
	cin >> s;
	
	vector<int> v(8);
	int b;
	bool c1, c2, c3;
	int ans = 0;
	bool imp;
	for(int i = 0; i < 256; i++)
	{
		b = i;
		for(int j = 0; j < 8; j++)
		{
			if(b & 1) v[j] = 1;
			else v[j] = 0;
			b >>= 1;
		}
		
		c1 = false;
		c2 = false;
		c3 = false;
		imp = false;
		for(int j = 0; j < 8; j++)
		{
			if(v[j] == 0) c1 = true;
			else
			{
				if(s[j] == 'l' || s[j] == 'o') c2 = true;
				else if(s[j] == 'a' || s[j] == 's') c3 = true;
				else
				{
					imp = true;
					break;
				}
			}
		}
		if(imp) continue;
		if(c1 && c2 && c3) ans++;
	}
	cout << ans << endl;
	return 0;
}
0