結果
| 問題 | No.548 国士無双 |
| コンテスト | |
| ユーザー |
|
| 提出日時 | 2024-05-26 22:29:35 |
| 言語 | Rust (1.94.0 + proconio + num + itertools) |
| 結果 |
AC
|
| 実行時間 | 1 ms / 2,000 ms |
| コード長 | 422 bytes |
| 記録 | |
| コンパイル時間 | 1,130 ms |
| コンパイル使用メモリ | 193,492 KB |
| 実行使用メモリ | 6,400 KB |
| 最終ジャッジ日時 | 2026-05-27 16:55:13 |
| 合計ジャッジ時間 | 2,729 ms |
|
ジャッジサーバーID (参考情報) |
judge1_0 / judge3_0 |
(要ログイン)
| ファイルパターン | 結果 |
|---|---|
| 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"),
}
}