結果
| 問題 | No.3820 TSG BINGO (All Language) |
| コンテスト | |
| ユーザー |
|
| 提出日時 | 2026-10-27 10:56:47 |
| 言語 | Python3 (3.15.2 + numpy 2.5.4 + scipy 1.18.1 + ACL) |
| 結果 |
AC
不安定
|
| 実行時間 | 17 ms / 2,000 ms |
| + 907µs | |
| コード長 | 997 bytes |
| 記録 | |
| コンパイル時間 | 59 ms |
| コンパイル使用メモリ | 14,976 KB |
| 実行使用メモリ | 10,368 KB |
| スコア | 50 |
| 最終ジャッジ日時 | 2026-11-21 14:30:31 |
| 合計ジャッジ時間 | 2,748 ms |
|
ジャッジサーバーID (参考情報) |
judge4_0 / judge3_0 |
| 純コード判定しない問題か言語 |
(要ログイン)
| ファイルパターン | 結果 |
|---|---|
| sample | AC * 2 |
| other | AC * 23 |
ソースコード
A = [list(map(int,input().split())) for _ in range(5)]
N = int(input())
is_marked = [[0]*5 for _ in range(5)]
is_marked[2][2] = 1
for _ in range(N):
b = int(input())
for j in range(5):
for k in range(5):
if b == A[j][k]:
is_marked[j][k] = 1
bingo = 0
#横1列
for i in range(5):
if all(is_marked[i]):
bingo += 1
#縦1列
for j in range(5):
if all(is_marked[i][j] for i in range(5)):
bingo += 1
#斜め1列
if all(is_marked[i][i] for i in range(5)):
bingo += 1
if all(is_marked[i][4-i] for i in range(5)):
bingo += 1
#T
if all(is_marked[0]) and all(is_marked[i][2] for i in range(5)):
bingo += 1
#S
if all(is_marked[0]) and all(is_marked[2]) and all(is_marked[4]) and is_marked[1][0] and is_marked[3][4]:
bingo += 1
#G
if all(is_marked[0]) and all(is_marked[4]) and is_marked[1][0] and is_marked[2][0] and is_marked[3][0] and is_marked[2][3] and is_marked[2][4] and is_marked[3][4]:
bingo += 1
print(bingo)