Submission #62559847
Source Code Expand
Copy
#![allow(unused_imports)]#![allow(unused_variables)]#![allow(non_snake_case)]use ac_library::*;use once_cell::sync::Lazy;use static_assertions::*;use varisat::*;use memoise::*;use argio::*;use bitvec::prelude::*;use counter::Counter;use hashbag::*;use pathfinding::prelude::*;use recur_fn::*;use ::indexing::*;use amplify::*;use amplify_derive::*;use amplify_num::*;use easy_ext::*;use multimap::*;use btreemultimap::*;
#![allow(unused_imports)] #![allow(unused_variables)] #![allow(non_snake_case)] use ac_library::*; use once_cell::sync::Lazy; use static_assertions::*; use varisat::*; use memoise::*; use argio::*; use bitvec::prelude::*; use counter::Counter; use hashbag::*; use pathfinding::prelude::*; use recur_fn::*; use ::indexing::*; use amplify::*; use amplify_derive::*; use amplify_num::*; use easy_ext::*; use multimap::*; use btreemultimap::*; use bstr::*; use az::*; use glidesort::*; use ::tap::*; use omniswap::*; use multiversion::*; use ::num::*; use num_bigint::*; use num_complex::*; use num_integer::*; use num_iter::*; use num_rational::*; use num_traits::*; use num_derive::*; use ndarray::*; use nalgebra::*; use alga::*; use libm::*; use rand::*; use getrandom::*; use rand_chacha::*; use rand_core::*; use rand_hc::*; use rand_pcg::*; use rand_distr::*; use petgraph::*; use indexmap::*; use regex::*; use lazy_static::*; use ordered_float::*; use ascii::*; use permutohedron::*; use superslice::*; use itertools::*; use itertools_num::*; use maplit::*; use either::*; use im_rc::*; use fixedbitset::*; use bitset_fixed::*; use proconio::input; use proconio::marker::{Bytes, Chars, Usize1}; use text_io::*; use rustc_hash::*; use smallvec::*; use std::collections::{BTreeMap, BTreeSet, HashMap, HashSet}; fn main() { input! { n: usize, m: usize, a: [usize; m], } let ans = solve(n, a); println!("{}", ans.len()); println!("{}", ans.iter().map(|x| x.to_string()).collect::<Vec<String>>().join(" ")); } fn solve(n: usize, a: Vec<usize>) -> Vec<usize> { let mut res = Vec::new(); let a_s: HashSet<usize> = a.into_iter().collect(); for i in 1..=n { if !a_s.contains(&i) { res.push(i); } } res }
Submission Info
Submission Time | |
---|---|
Task | B - Who is Missing? |
User | maysay_d |
Language | Rust (rustc 1.70.0) |
Score | 200 |
Code Size | 1797 Byte |
Status | AC |
Exec Time | 1 ms |
Memory | 2152 KB |
Judge Result
Set Name | Sample | All | ||||
---|---|---|---|---|---|---|
Score / Max Score | 0 / 0 | 200 / 200 | ||||
Status |
|
|
Set Name | Test Cases |
---|---|
Sample | sample_01.txt, sample_02.txt, sample_03.txt |
All | sample_01.txt, sample_02.txt, sample_03.txt, test_01.txt, test_02.txt, test_03.txt, test_04.txt, test_05.txt, test_06.txt, test_07.txt, test_08.txt, test_09.txt, test_10.txt, test_11.txt, test_12.txt, test_13.txt, test_14.txt, test_15.txt, test_16.txt, test_17.txt, test_18.txt, test_19.txt, test_20.txt, test_21.txt, test_22.txt, test_23.txt, test_24.txt, test_25.txt, test_26.txt, test_27.txt, test_28.txt, test_29.txt, test_30.txt, test_31.txt, test_32.txt, test_33.txt, test_34.txt, test_35.txt, test_36.txt, test_37.txt, test_38.txt, test_39.txt, test_40.txt |
Case Name | Status | Exec Time | Memory |
---|---|---|---|
sample_01.txt | AC | 1 ms | 1864 KB |
sample_02.txt | AC | 1 ms | 1808 KB |
sample_03.txt | AC | 1 ms | 1944 KB |
test_01.txt | AC | 1 ms | 1908 KB |
test_02.txt | AC | 1 ms | 1948 KB |
test_03.txt | AC | 1 ms | 2096 KB |
test_04.txt | AC | 1 ms | 1944 KB |
test_05.txt | AC | 0 ms | 1940 KB |
test_06.txt | AC | 1 ms | 2008 KB |
test_07.txt | AC | 1 ms | 2008 KB |
test_08.txt | AC | 1 ms | 2012 KB |
test_09.txt | AC | 1 ms | 2056 KB |
test_10.txt | AC | 1 ms | 1876 KB |
test_11.txt | AC | 1 ms | 1872 KB |
test_12.txt | AC | 1 ms | 1992 KB |
test_13.txt | AC | 1 ms | 1948 KB |
test_14.txt | AC | 1 ms | 1840 KB |
test_15.txt | AC | 1 ms | 1928 KB |
test_16.txt | AC | 1 ms | 1836 KB |
test_17.txt | AC | 1 ms | 1964 KB |
test_18.txt | AC | 1 ms | 2072 KB |
test_19.txt | AC | 1 ms | 1948 KB |
test_20.txt | AC | 1 ms | 1936 KB |
test_21.txt | AC | 1 ms | 2080 KB |
test_22.txt | AC | 1 ms | 1880 KB |
test_23.txt | AC | 1 ms | 1928 KB |
test_24.txt | AC | 1 ms | 1988 KB |
test_25.txt | AC | 1 ms | 2096 KB |
test_26.txt | AC | 1 ms | 1972 KB |
test_27.txt | AC | 0 ms | 1988 KB |
test_28.txt | AC | 1 ms | 1868 KB |
test_29.txt | AC | 1 ms | 2104 KB |
test_30.txt | AC | 1 ms | 2148 KB |
test_31.txt | AC | 1 ms | 2088 KB |
test_32.txt | AC | 1 ms | 2104 KB |
test_33.txt | AC | 1 ms | 1988 KB |
test_34.txt | AC | 1 ms | 1936 KB |
test_35.txt | AC | 1 ms | 1992 KB |
test_36.txt | AC | 1 ms | 2004 KB |
test_37.txt | AC | 1 ms | 2036 KB |
test_38.txt | AC | 1 ms | 2004 KB |
test_39.txt | AC | 1 ms | 1960 KB |
test_40.txt | AC | 1 ms | 2152 KB |