結果
| 問題 | No.182 新規性の虜 |
| コンテスト | |
| ユーザー |
cra77756176
|
| 提出日時 | 2022-11-28 22:04:38 |
| 言語 | Rust (1.94.0 + proconio + num + itertools) |
| 結果 |
AC
|
| 実行時間 | 6 ms / 5,000 ms |
| コード長 | 541 bytes |
| 記録 | |
| コンパイル時間 | 4,268 ms |
| コンパイル使用メモリ | 196,828 KB |
| 実行使用メモリ | 6,400 KB |
| 最終ジャッジ日時 | 2026-04-21 07:48:50 |
| 合計ジャッジ時間 | 5,654 ms |
|
ジャッジサーバーID (参考情報) |
judge1_1 / judge3_1 |
(要ログイン)
| ファイルパターン | 結果 |
|---|---|
| sample | AC * 3 |
| other | AC * 27 |
ソースコード
use std::{collections::HashSet, io};
fn main() {
io::stdin().read_line(&mut String::new()).ok();
let mut a = String::new();
io::stdin().read_line(&mut a).ok();
let mut a = a
.split_whitespace()
.map(|n| n.parse::<u64>().unwrap())
.collect::<Vec<_>>();
a.sort_unstable();
let duplicates = a
.windows(2)
.filter_map(|n| if n[0] == n[1] { Some(n[0]) } else { None })
.collect::<HashSet<_>>();
a.retain(|n| !duplicates.contains(n));
println!("{}", a.len());
}
cra77756176