結果

問題 No.583 鉄道同好会
ユーザー nebukuro09nebukuro09
提出日時 2017-10-28 03:30:33
言語 Python2
(2.7.18)
結果
RE  
実行時間 -
コード長 235 bytes
コンパイル時間 101 ms
コンパイル使用メモリ 6,716 KB
実行使用メモリ 6,800 KB
最終ジャッジ日時 2023-08-14 05:51:34
合計ジャッジ時間 2,751 ms
ジャッジサーバーID
(参考情報)
judge13 / judge15
このコードへのチャレンジ
(要ログイン)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 RE -
testcase_01 RE -
testcase_02 AC 11 ms
6,020 KB
testcase_03 RE -
testcase_04 RE -
testcase_05 RE -
testcase_06 AC 11 ms
6,024 KB
testcase_07 AC 11 ms
5,916 KB
testcase_08 AC 11 ms
5,808 KB
testcase_09 RE -
testcase_10 RE -
testcase_11 AC 90 ms
6,160 KB
testcase_12 AC 121 ms
6,268 KB
testcase_13 AC 121 ms
6,204 KB
testcase_14 AC 120 ms
6,248 KB
testcase_15 AC 153 ms
6,264 KB
testcase_16 AC 281 ms
6,544 KB
testcase_17 AC 336 ms
6,788 KB
testcase_18 AC 333 ms
6,800 KB
権限があれば一括ダウンロードができます

ソースコード

diff #

N, M = map(int, raw_input().split())
deg = [0 for _ in xrange(M)]
for _ in xrange(M):
    a, b = map(int, raw_input().split())
    deg[a] += 1
    deg[b] += 1
odd = sum(d % 2 for d in deg)
print "YES" if odd == 0 or odd == 2 else "NO"
0