Submission #45267924
Source Code Expand
use std::collections::HashSet; use proconio::input; fn main() { input! { n: usize, a: [usize; n], }; let count = a.iter().copied().collect::<HashSet<_>>().len(); let ans = if count % 2 == 0 { count - 1 } else { count }; println!("{}", ans); }
Submission Info
Submission Time | |
---|---|
Task | D - Card Eater |
User | bouzuya |
Language | Rust (rustc 1.70.0) |
Score | 400 |
Code Size | 281 Byte |
Status | AC |
Exec Time | 5 ms |
Memory | 4492 KiB |
Judge Result
Set Name | Sample | All | ||||
---|---|---|---|---|---|---|
Score / Max Score | 0 / 0 | 400 / 400 | ||||
Status |
|
|
Set Name | Test Cases |
---|---|
Sample | 00_example_01.txt, 00_example_02.txt |
All | 00_example_01.txt, 00_example_02.txt, 01.txt, 02.txt, 03.txt, 04.txt, 05.txt, 06.txt, 07.txt, 08.txt, 09.txt, 10.txt, 11.txt, 12.txt, 13.txt, 14.txt, 15.txt |
Case Name | Status | Exec Time | Memory |
---|---|---|---|
00_example_01.txt | AC | 1 ms | 1988 KiB |
00_example_02.txt | AC | 1 ms | 2088 KiB |
01.txt | AC | 0 ms | 1936 KiB |
02.txt | AC | 1 ms | 2080 KiB |
03.txt | AC | 0 ms | 2092 KiB |
04.txt | AC | 0 ms | 1852 KiB |
05.txt | AC | 0 ms | 1984 KiB |
06.txt | AC | 4 ms | 3572 KiB |
07.txt | AC | 4 ms | 3688 KiB |
08.txt | AC | 5 ms | 4492 KiB |
09.txt | AC | 4 ms | 3532 KiB |
10.txt | AC | 4 ms | 3352 KiB |
11.txt | AC | 4 ms | 4388 KiB |
12.txt | AC | 4 ms | 3652 KiB |
13.txt | AC | 4 ms | 4284 KiB |
14.txt | AC | 5 ms | 4276 KiB |
15.txt | AC | 4 ms | 3448 KiB |