結果
| 問題 |
No.870 無敵囲い
|
| コンテスト | |
| ユーザー |
Schnee
|
| 提出日時 | 2022-10-15 04:04:52 |
| 言語 | Python3 (3.13.1 + numpy 2.2.1 + scipy 1.14.1) |
| 結果 |
WA
|
| 実行時間 | - |
| コード長 | 308 bytes |
| コンパイル時間 | 91 ms |
| コンパイル使用メモリ | 12,800 KB |
| 実行使用メモリ | 10,880 KB |
| 最終ジャッジ日時 | 2024-06-26 19:21:50 |
| 合計ジャッジ時間 | 1,399 ms |
|
ジャッジサーバーID (参考情報) |
judge1 / judge3 |
(要ログイン)
| ファイルパターン | 結果 |
|---|---|
| sample | AC * 2 WA * 1 |
| other | AC * 9 WA * 9 |
ソースコード
def sp(l):
l = list(map(int, l))
return l[:2], l[2:]
n = int(input())
a, b, c = [2, 8], [3, 9], [7, 9]
for _ in "_"*n:
d, s = sp(input().split())
if d == a:
a = s
elif d == b:
b = s
elif d == c:
c = s
print("YNEOS"[a!=[5, 8] and b!=[4, 8] and c!=[6, 8]::2])
Schnee