結果
| 問題 |
No.806 木を道に
|
| コンテスト | |
| ユーザー |
cra77756176
|
| 提出日時 | 2022-12-17 19:50:04 |
| 言語 | Rust (1.83.0 + proconio) |
| 結果 |
AC
|
| 実行時間 | 11 ms / 2,000 ms |
| コード長 | 384 bytes |
| コンパイル時間 | 14,027 ms |
| コンパイル使用メモリ | 396,904 KB |
| 実行使用メモリ | 6,824 KB |
| 最終ジャッジ日時 | 2024-11-17 04:55:42 |
| 合計ジャッジ時間 | 15,315 ms |
|
ジャッジサーバーID (参考情報) |
judge1 / judge3 |
(要ログイン)
| ファイルパターン | 結果 |
|---|---|
| sample | AC * 2 |
| other | AC * 27 |
ソースコード
fn main() {
let mut xx = String::new();
std::io::Read::read_to_string(&mut std::io::stdin(), &mut xx).ok();
let xx: Vec<usize> = xx.split_whitespace().flat_map(str::parse).collect();
let mut count = vec![0; xx[0] + 1];
for &n in &xx[1..] {
count[n] += 1;
}
let answer = count.iter().filter(|&&n| n == 1).count() - 2;
println!("{answer}");
}
cra77756176