結果
| 問題 | No.2201 p@$$w0rd |
| コンテスト | |
| ユーザー |
|
| 提出日時 | 2026-10-14 18:12:35 |
| 言語 | Rust (1.99.0 + proconio + num + itertools + ACL) |
| 結果 |
AC
不安定
|
| 実行時間 | 1 ms / 2,000 ms |
| + 74µs | |
| コード長 | 918 bytes |
| 記録 | |
| コンパイル時間 | 1,090 ms |
| コンパイル使用メモリ | 201,768 KB |
| 実行使用メモリ | 9,868 KB |
| 最終ジャッジ日時 | 2026-10-14 18:12:44 |
| 合計ジャッジ時間 | 3,191 ms |
|
ジャッジサーバーID (参考情報) |
judge5_0 / judge3_0 |
(要ログイン)
| ファイルパターン | 結果 |
|---|---|
| other | AC * 24 |
コンパイルメッセージ
warning: unnecessary parentheses around `for` iterator expression
--> src/main.rs:14:14
|
14 | for i in (0..1<<s.len()){
| ^ ^
|
= note: `#[warn(unused_parens)]` (part of `#[warn(unused)]`) on by default
help: remove these parentheses
|
14 - for i in (0..1<<s.len()){
14 + for i in 0..1<<s.len() {
|
ソースコード
use proconio::input;
use std::collections::HashMap;
use std::collections::BTreeSet;
fn main(){
input!{
s:String,
}
let mut map=HashMap::new();
map.insert('l','1');
map.insert('o','0');
map.insert('a','@');
map.insert('s','$');
let mut set=BTreeSet::new();
for i in (0..1<<s.len()){
let mut c=String::from("");let mut p=0;
for j in s.chars(){
if i>>p&1==1 && map.contains_key(&j){
c.push(map[&j]);
} else {
c.push(j);
}
p+=1
}
let mut a=0;let mut b=0;let mut d=0;
for j in c.chars(){
if 'a'<=j && j<='z'{
a=1;
} else if '0'<=j && j<='9'{
b=1;
} else{
d=1;
}
}
if a==0 || b==0 || d==0{
continue;
}
set.insert(c);
}
print!("{}",set.len());
}