提出 #40354718


ソースコード 拡げる

use proconio::input;

fn main() {
    input! {
      a: [[usize; 3]; 3],
      n: usize,
      b: [usize; n],
    }

    let mut c = vec![vec![false; 3]; 3];
    for b_i in b {
        for j in 0..3 {
            for k in 0..3 {
                if a[j][k] == b_i {
                    c[j][k] = true;
                }
            }
        }
    }

    let ans = (0..3).any(|i| (0..3).all(|j| c[i][j]))
        || (0..3).any(|j| (0..3).all(|i| c[i][j]))
        || (0..3).all(|i| c[i][i])
        || (0..3).all(|i| c[i][3 - 1 - i]);
    println!("{}", if ans { "Yes" } else { "No" });
}

提出情報

提出日時
問題 B - Bingo
ユーザ bouzuya
言語 Rust (1.42.0)
得点 200
コード長 588 Byte
結果 AC
実行時間 6 ms
メモリ 2148 KiB

ジャッジ結果

セット名 Sample All
得点 / 配点 0 / 0 200 / 200
結果
AC × 3
AC × 16
セット名 テストケース
Sample 00-sample-0, 00-sample-281, 00-sample-511
All 00-sample-0, 00-sample-281, 00-sample-511, 01-random-134, 01-random-238, 01-random-292, 01-random-297, 01-random-314, 01-random-329, 01-random-352, 01-random-387, 01-random-392, 01-random-420, 01-random-462, 01-random-500, 01-random-86
ケース名 結果 実行時間 メモリ
00-sample-0 AC 6 ms 2092 KiB
00-sample-281 AC 2 ms 2144 KiB
00-sample-511 AC 1 ms 2112 KiB
01-random-134 AC 1 ms 2080 KiB
01-random-238 AC 1 ms 2148 KiB
01-random-292 AC 1 ms 2060 KiB
01-random-297 AC 1 ms 1920 KiB
01-random-314 AC 1 ms 2064 KiB
01-random-329 AC 1 ms 2108 KiB
01-random-352 AC 2 ms 1996 KiB
01-random-387 AC 1 ms 2016 KiB
01-random-392 AC 2 ms 2004 KiB
01-random-420 AC 1 ms 2028 KiB
01-random-462 AC 1 ms 2136 KiB
01-random-500 AC 1 ms 2056 KiB
01-random-86 AC 1 ms 2056 KiB