結果
| 問題 |
No.870 無敵囲い
|
| コンテスト | |
| ユーザー |
|
| 提出日時 | 2019-08-30 21:39:35 |
| 言語 | Python3 (3.13.1 + numpy 2.2.1 + scipy 1.14.1) |
| 結果 |
AC
|
| 実行時間 | 29 ms / 300 ms |
| コード長 | 390 bytes |
| コンパイル時間 | 92 ms |
| コンパイル使用メモリ | 12,800 KB |
| 実行使用メモリ | 10,880 KB |
| 最終ジャッジ日時 | 2024-06-29 06:16:23 |
| 合計ジャッジ時間 | 1,243 ms |
|
ジャッジサーバーID (参考情報) |
judge4 / judge5 |
(要ログイン)
| ファイルパターン | 結果 |
|---|---|
| sample | AC * 3 |
| other | AC * 18 |
ソースコード
N = int(input())
A = 28
B = 39
C = 79
mat = [[0 for j in range(1, 11)] for i in range(1, 11)]
mat[2][8] = 1
mat[3][9] = 2
mat[7][9] = 3
for i in range(N):
A = input().split()
x1, y1, x2, y2 = map(int, A)
assert mat[x2][y2] == 0
mat[x2][y2] = mat[x1][y1]
mat[x1][y1] = 0
if mat[5][8] == 1 and mat[4][8] == 2 and mat[6][8] == 3:
print("YES")
else:
print("NO")