結果

問題 No.483 マッチ並べ
ユーザー nebukuro09nebukuro09
提出日時 2017-02-10 23:09:24
言語 Python2
(2.7.18)
結果
WA  
実行時間 -
コード長 561 bytes
コンパイル時間 730 ms
コンパイル使用メモリ 6,500 KB
実行使用メモリ 10,484 KB
最終ジャッジ日時 2023-08-28 12:16:15
合計ジャッジ時間 4,116 ms
ジャッジサーバーID
(参考情報)
judge13 / judge14
このコードへのチャレンジ
(要ログイン)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 25 ms
10,272 KB
testcase_01 AC 23 ms
10,320 KB
testcase_02 AC 24 ms
10,392 KB
testcase_03 AC 24 ms
10,244 KB
testcase_04 AC 24 ms
10,324 KB
testcase_05 AC 24 ms
10,320 KB
testcase_06 AC 24 ms
10,236 KB
testcase_07 WA -
testcase_08 WA -
testcase_09 WA -
testcase_10 WA -
testcase_11 AC 23 ms
10,324 KB
testcase_12 AC 23 ms
10,308 KB
testcase_13 AC 25 ms
10,316 KB
testcase_14 AC 25 ms
10,356 KB
testcase_15 WA -
testcase_16 AC 24 ms
10,272 KB
testcase_17 AC 24 ms
10,344 KB
testcase_18 AC 25 ms
10,444 KB
testcase_19 AC 25 ms
10,240 KB
testcase_20 AC 24 ms
10,420 KB
testcase_21 AC 24 ms
10,388 KB
testcase_22 AC 24 ms
10,336 KB
testcase_23 AC 24 ms
10,344 KB
testcase_24 AC 23 ms
10,232 KB
testcase_25 WA -
testcase_26 WA -
testcase_27 AC 23 ms
10,356 KB
testcase_28 AC 24 ms
10,252 KB
testcase_29 AC 24 ms
10,248 KB
testcase_30 AC 24 ms
10,416 KB
testcase_31 AC 23 ms
10,248 KB
testcase_32 AC 24 ms
10,404 KB
testcase_33 AC 24 ms
10,344 KB
testcase_34 AC 24 ms
10,236 KB
testcase_35 WA -
testcase_36 WA -
testcase_37 WA -
testcase_38 WA -
testcase_39 AC 24 ms
10,400 KB
testcase_40 AC 23 ms
10,396 KB
testcase_41 AC 24 ms
10,416 KB
testcase_42 AC 24 ms
10,288 KB
testcase_43 AC 25 ms
10,320 KB
testcase_44 AC 24 ms
10,232 KB
testcase_45 AC 24 ms
10,360 KB
testcase_46 AC 24 ms
10,408 KB
testcase_47 AC 25 ms
10,320 KB
testcase_48 AC 25 ms
10,372 KB
testcase_49 AC 25 ms
10,280 KB
testcase_50 AC 25 ms
10,404 KB
testcase_51 AC 24 ms
10,248 KB
testcase_52 AC 24 ms
10,256 KB
testcase_53 AC 24 ms
10,232 KB
testcase_54 AC 23 ms
10,232 KB
testcase_55 AC 24 ms
10,312 KB
権限があれば一括ダウンロードができます

ソースコード

diff #

n = input()
m = [map(int, raw_input().split()) for _ in xrange(n)]

B = {}
P = {}
for i in xrange(0, 111):
    for j in xrange(0, 111):
        B[(i, j)] = 0
        P[(i, j)] = 0

for a, b, c, d in m:
    if a == c:
        B[(a, b)] += 1
        B[(a-1, b)] += 1
    else:
        B[(a, b)] += 1
        B[(a, b-1)] += 1
    P[(a, b)] += 1
    P[(c, d)] += 1

for k, v in B.items():
    if v != 4:
        continue
    a, b = k
    if P[(a, b)] >= 3 or P[(a, b+1)] >= 3 or P[(a+1, b)] >= 3 or P[(a+1, b+1)] >= 3:
        print "NO"
        exit()
print "YES"
0