結果
| 問題 | No.3819 TSG BINGO (Python) |
| コンテスト | |
| ユーザー |
👑 |
| 提出日時 | 2026-11-21 15:45:20 |
| 言語 | PyPy3 (8.0.1 + ACL) |
| 結果 |
AC
不安定
|
| 実行時間 | 41 ms / 2,000 ms |
| + 719µs | |
| コード長 | 997 bytes |
| 記録 | |
| コンパイル時間 | 91 ms |
| コンパイル使用メモリ | 64,160 KB |
| 実行使用メモリ | 58,368 KB |
| スコア | 100 |
| 最終ジャッジ日時 | 2026-11-21 15:45:32 |
| 合計ジャッジ時間 | 3,474 ms |
|
ジャッジサーバーID (参考情報) |
judge1_0 / judge2_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)