結果

問題 No.483 マッチ並べ
コンテスト
ユーザー nanae
提出日時 2017-02-11 01:08:41
言語 Python3
(3.15.0 + numpy 2.5.4 + scipy 1.18.1 + ACL)
コンパイル:
python3 -mpy_compile _filename_
実行:
python3 _filename_
結果
WA  
実行時間 -
コード長 523 bytes
記録
記録タグの例:
初AC ショートコード 純ショートコード 純主流ショートコード 最速実行時間
コンパイル時間 55 ms
コンパイル使用メモリ 14,976 KB
実行使用メモリ 11,008 KB
最終ジャッジ日時 2026-10-09 07:56:05
合計ジャッジ時間 3,463 ms
ジャッジサーバーID
(参考情報)
judge2_0 / judge1_0
このコードへのチャレンジ
(要ログイン)
ファイルパターン 結果
sample AC * 3
other AC * 44 WA * 9
権限があれば一括ダウンロードができます

ソースコード

diff #
raw source code

import sys

def debug(x, table):
    for name, val in table.items():
        if x is val:
            print('DEBUG:{} -> {}'.format(name, val), file=sys.stderr)
            return None

def solve():
    N = int(input())
    nodes = set()

    for i in range(N):
        r0, c0, r1, c1 = map(int, input().split())
        nodes.add((r0, c0))
        nodes.add((r1, c1))

    v = len(nodes)
    e = N

    if v - e >= 1:
        ans = 'YES'
    else:
        ans = 'NO'

    print(ans)

if __name__ == '__main__':
    solve()
0