結果

問題 No.870 無敵囲い
ユーザー miya145592miya145592
提出日時 2023-05-02 00:14:08
言語 PyPy3
(7.3.15)
結果
AC  
実行時間 74 ms / 300 ms
コード長 415 bytes
コンパイル時間 970 ms
コンパイル使用メモリ 87,108 KB
実行使用メモリ 71,580 KB
最終ジャッジ日時 2023-08-13 03:11:38
合計ジャッジ時間 3,231 ms
ジャッジサーバーID
(参考情報)
judge12 / judge14
このコードへのチャレンジ
(要ログイン)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 72 ms
71,288 KB
testcase_01 AC 74 ms
71,292 KB
testcase_02 AC 73 ms
71,388 KB
testcase_03 AC 73 ms
71,176 KB
testcase_04 AC 71 ms
71,276 KB
testcase_05 AC 72 ms
71,336 KB
testcase_06 AC 72 ms
71,284 KB
testcase_07 AC 73 ms
71,384 KB
testcase_08 AC 72 ms
71,544 KB
testcase_09 AC 73 ms
71,172 KB
testcase_10 AC 72 ms
71,572 KB
testcase_11 AC 73 ms
71,232 KB
testcase_12 AC 73 ms
71,580 KB
testcase_13 AC 72 ms
71,280 KB
testcase_14 AC 73 ms
71,228 KB
testcase_15 AC 74 ms
71,332 KB
testcase_16 AC 71 ms
71,304 KB
testcase_17 AC 71 ms
71,172 KB
testcase_18 AC 72 ms
71,520 KB
testcase_19 AC 73 ms
71,472 KB
testcase_20 AC 72 ms
71,152 KB
権限があれば一括ダウンロードができます

ソースコード

diff #

N = int(input())
xyxy = [list(map(int, input().split())) for _ in range(N)]
d = dict()
d[(2, 8)] = 'A'
d[(3, 9)] = 'B'
d[(7, 9)] = 'C'
for x1, y1, x2, y2 in xyxy:
    if (x1, y1) in d:
        d[(x2, y2)] = d[(x1, y1)]
        d[(x1, y1)] = ''
if (5, 8) not in d or (4, 8) not in d or (6, 8) not in d:
    print("NO")
elif d[(5, 8)]=='A' and d[(4, 8)]=='B' and d[(6, 8)]=='C':
    print("YES")
else:
    print("NO")
0