結果

問題 No.870 無敵囲い
ユーザー hal9009
提出日時 2020-11-20 22:24:49
言語 Python3
(3.13.1 + numpy 2.2.1 + scipy 1.14.1)
結果
WA  
実行時間 -
コード長 480 bytes
コンパイル時間 73 ms
コンパイル使用メモリ 12,544 KB
実行使用メモリ 10,752 KB
最終ジャッジ日時 2024-06-29 06:46:03
合計ジャッジ時間 1,429 ms
ジャッジサーバーID
(参考情報)
judge2 / judge1
このコードへのチャレンジ
(要ログイン)
ファイルパターン 結果
sample AC * 3
other AC * 15 WA * 3
権限があれば一括ダウンロードができます

ソースコード

diff #

s  =   [[2, 8], [3, 9], [7, 9]]
goal = [[5, 8], [4, 8], [6, 8]]

n = int(input())
xy1 = []
xy2 = []

for i in range(n):
    xi1, yi1, xi2, yi2 = map(int, input().split())
    xy1.append([xi1, yi1])
    xy2.append([xi2, yi2])

ans = 'NO'

if s == goal:
    print('YES')
else:
    for i in range(n):

        if xy1[i] not in s:
            s.append(xy1[i])


        s[s.index(xy1[i])] = xy2[i]

        if s[0:3] == goal:
            ans = 'YES'

            break
    print(ans)
0