結果
| 問題 |
No.548 国士無双
|
| コンテスト | |
| ユーザー |
|
| 提出日時 | 2024-05-26 22:29:35 |
| 言語 | Rust (1.83.0 + proconio) |
| 結果 |
AC
|
| 実行時間 | 1 ms / 2,000 ms |
| コード長 | 422 bytes |
| コンパイル時間 | 13,848 ms |
| コンパイル使用メモリ | 401,032 KB |
| 実行使用メモリ | 6,820 KB |
| 最終ジャッジ日時 | 2024-12-20 20:28:17 |
| 合計ジャッジ時間 | 15,092 ms |
|
ジャッジサーバーID (参考情報) |
judge3 / judge1 |
(要ログイン)
| ファイルパターン | 結果 |
|---|---|
| other | AC * 24 |
ソースコード
use std::collections::HashMap;
fn main() {
let mut s = String::new();
std::io::stdin().read_line(&mut s).ok();
let l = "abcdefghijklm".chars();
let mut a = HashMap::new();
for c in s.trim().chars() {
*a.entry(c).or_insert(0) += 1;
}
match a.len() {
13 => l.for_each(|c| println!("{}", c)),
12 => l
.filter(|&c| !a.contains_key(&c))
.for_each(|c| println!("{}", c)),
_ => println!("Impossible"),
}
}