結果

問題 No.3280 Black-Tailed Gull vs Monster
ユーザー The_Bouningeeeen
提出日時 2025-09-26 21:26:02
言語 Rust
(1.83.0 + proconio)
結果
AC  
実行時間 22 ms / 2,000 ms
コード長 467 bytes
コンパイル時間 27,299 ms
コンパイル使用メモリ 401,024 KB
実行使用メモリ 7,716 KB
最終ジャッジ日時 2025-09-26 21:26:41
合計ジャッジ時間 13,575 ms
ジャッジサーバーID
(参考情報)
judge4 / judge3
このコードへのチャレンジ
(要ログイン)
ファイルパターン 結果
sample AC * 2
other AC * 40
権限があれば一括ダウンロードができます

ソースコード

diff #

use proconio::input;
use std::collections::HashSet;

fn main() {
    input! {
        _n: usize,
        x: usize,
        q: usize,
    }

    let mut ans = 0.;
    for _ in 0..q {
        input! {
            m: usize,
            f: [usize; m],
        }

        let f: HashSet<usize> = f.into_iter().collect();
        if f.contains(&x) {
            ans += 1.;
        } else if f.len() != m {
            ans += 0.5;
        }
    }
    println!("{}", ans);
}
0