結果
| 問題 |
No.2201 p@$$w0rd
|
| コンテスト | |
| ユーザー |
Kome_soudou
|
| 提出日時 | 2023-02-18 02:24:47 |
| 言語 | C++14 (gcc 13.3.0 + boost 1.87.0) |
| 結果 |
AC
|
| 実行時間 | 2 ms / 2,000 ms |
| コード長 | 661 bytes |
| コンパイル時間 | 1,538 ms |
| コンパイル使用メモリ | 167,820 KB |
| 実行使用メモリ | 5,376 KB |
| 最終ジャッジ日時 | 2024-07-19 16:49:26 |
| 合計ジャッジ時間 | 2,469 ms |
|
ジャッジサーバーID (参考情報) |
judge2 / judge4 |
(要ログイン)
| ファイルパターン | 結果 |
|---|---|
| other | AC * 24 |
ソースコード
#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;
}
Kome_soudou