Submission #16487996


Source Code Expand

Copy
use proconio::input;

fn main() {
    input! {
        _: usize,
        m: usize,
        ab: [(i64, i64); m],
    };
    let mut map = std::collections::BTreeMap::new();
    for &(a_i, b_i) in ab.iter() {
        *map.entry(a_i).or_insert(0) += 1;
        *map.entry(b_i).or_insert(0) += 1;
    }
    let ans = map.values().all(|count| count % 2 == 0);
    println!("{}", if ans { "YES" } else { "NO" });
}

Submission Info

Submission Time
Task B - Unplanned Queries
User bouzuya
Language Rust (1.42.0)
Score 500
Code Size 409 Byte
Status AC
Exec Time 50 ms
Memory 6720 KB

Judge Result

Set Name Sample All
Score / Max Score 0 / 0 500 / 500
Status
AC × 2
AC × 20
Set Name Test Cases
Sample sample1.txt, sample2.txt
All sample1.txt, sample2.txt, in1.txt, in10.txt, in11.txt, in12.txt, in13.txt, in14.txt, in15.txt, in16.txt, in2.txt, in3.txt, in4.txt, in5.txt, in6.txt, in7.txt, in8.txt, in9.txt, sample1.txt, sample2.txt
Case Name Status Exec Time Memory
in1.txt AC 45 ms 6628 KB
in10.txt AC 42 ms 6200 KB
in11.txt AC 33 ms 4672 KB
in12.txt AC 39 ms 6164 KB
in13.txt AC 43 ms 6092 KB
in14.txt AC 41 ms 6612 KB
in15.txt AC 2 ms 2080 KB
in16.txt AC 2 ms 2068 KB
in2.txt AC 42 ms 6720 KB
in3.txt AC 45 ms 6712 KB
in4.txt AC 50 ms 6632 KB
in5.txt AC 39 ms 6668 KB
in6.txt AC 40 ms 6184 KB
in7.txt AC 39 ms 6124 KB
in8.txt AC 41 ms 6228 KB
in9.txt AC 44 ms 6068 KB
sample1.txt AC 5 ms 2044 KB
sample2.txt AC 1 ms 2068 KB