提出 #39412560


ソースコード 拡げる

#[allow(unused_imports)]
use petgraph::unionfind::UnionFind;
#[allow(unused_imports)]
use proconio::{fastout, input, marker::Chars, marker::Usize1};
#[allow(unused_imports)]
use std::collections::{HashSet, VecDeque};

#[fastout]
fn main() {
    input! {
        n:usize , q:usize,
        ab:[(usize , Usize1);q],
    }

    let mut data: Vec<usize> = vec![0_usize; n];
    for (a, b) in ab {
        if a == 1 {
            data[b] += 1;
        } else if a == 2 {
            data[b] += 2;
        } else {
            if data[b] >= 2 {
                println!("Yes");
            } else {
                println!("No");
            }
        }
    }
}

提出情報

提出日時
問題 B - Yellow and Red Card
ユーザ sou31415
言語 Rust (1.42.0)
得点 200
コード長 657 Byte
結果 AC
実行時間 6 ms
メモリ 2200 KiB

ジャッジ結果

セット名 Sample All
得点 / 配点 0 / 0 200 / 200
結果
AC × 1
AC × 17
セット名 テストケース
Sample 00_sample_00.txt
All 00_sample_00.txt, 01_corner_00.txt, 02_random_00.txt, 02_random_01.txt, 02_random_02.txt, 02_random_03.txt, 02_random_04.txt, 02_random_05.txt, 02_random_06.txt, 02_random_07.txt, 02_random_08.txt, 02_random_09.txt, 03_n_min_00.txt, 03_n_min_01.txt, 03_n_min_02.txt, 04_no_exit_00.txt, 04_no_exit_01.txt
ケース名 結果 実行時間 メモリ
00_sample_00.txt AC 6 ms 2124 KiB
01_corner_00.txt AC 2 ms 2200 KiB
02_random_00.txt AC 2 ms 2164 KiB
02_random_01.txt AC 4 ms 2000 KiB
02_random_02.txt AC 1 ms 2096 KiB
02_random_03.txt AC 1 ms 2068 KiB
02_random_04.txt AC 4 ms 1980 KiB
02_random_05.txt AC 1 ms 2188 KiB
02_random_06.txt AC 1 ms 2120 KiB
02_random_07.txt AC 1 ms 2096 KiB
02_random_08.txt AC 1 ms 2092 KiB
02_random_09.txt AC 2 ms 2096 KiB
03_n_min_00.txt AC 2 ms 2100 KiB
03_n_min_01.txt AC 2 ms 2200 KiB
03_n_min_02.txt AC 2 ms 2032 KiB
04_no_exit_00.txt AC 1 ms 1996 KiB
04_no_exit_01.txt AC 1 ms 2148 KiB