Submission #39729225
Source Code Expand
use std::collections::HashSet;
use proconio::input;
fn main() {
input! {
n: usize,
a: [usize; n],
};
let mut set = HashSet::new();
for a_i in a {
if !set.insert(a_i) {
set.remove(&a_i);
}
}
let ans = set.len();
println!("{}", ans);
}
Submission Info
| Submission Time | |
|---|---|
| Task | C - Write and Erase |
| User | bouzuya |
| Language | Rust (1.42.0) |
| Score | 300 |
| Code Size | 308 Byte |
| Status | AC |
| Exec Time | 23 ms |
| Memory | 5552 KiB |
Judge Result
| Set Name | Sample | All | ||||
|---|---|---|---|---|---|---|
| Score / Max Score | 0 / 0 | 300 / 300 | ||||
| Status |
|
|
| Set Name | Test Cases |
|---|---|
| Sample | sample_01.txt, sample_02.txt, sample_03.txt |
| All | 01.txt, 02.txt, 03.txt, 04.txt, 05.txt, 06.txt, 07.txt, 08.txt, sample_01.txt, sample_02.txt, sample_03.txt |
| Case Name | Status | Exec Time | Memory |
|---|---|---|---|
| 01.txt | AC | 22 ms | 3620 KiB |
| 02.txt | AC | 23 ms | 3648 KiB |
| 03.txt | AC | 18 ms | 5552 KiB |
| 04.txt | AC | 15 ms | 3548 KiB |
| 05.txt | AC | 20 ms | 4756 KiB |
| 06.txt | AC | 15 ms | 3632 KiB |
| 07.txt | AC | 11 ms | 3092 KiB |
| 08.txt | AC | 22 ms | 3584 KiB |
| sample_01.txt | AC | 2 ms | 2052 KiB |
| sample_02.txt | AC | 2 ms | 2088 KiB |
| sample_03.txt | AC | 2 ms | 2068 KiB |