結果

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

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 11 ms
5,844 KB
testcase_01 AC 12 ms
5,884 KB
testcase_02 AC 11 ms
5,976 KB
testcase_03 AC 11 ms
5,996 KB
testcase_04 WA -
testcase_05 AC 11 ms
5,976 KB
testcase_06 AC 11 ms
5,824 KB
testcase_07 AC 11 ms
5,980 KB
testcase_08 AC 11 ms
5,976 KB
testcase_09 AC 11 ms
5,780 KB
testcase_10 AC 12 ms
5,780 KB
testcase_11 AC 86 ms
5,916 KB
testcase_12 AC 115 ms
5,852 KB
testcase_13 AC 116 ms
6,004 KB
testcase_14 AC 115 ms
5,848 KB
testcase_15 AC 147 ms
5,888 KB
testcase_16 AC 267 ms
5,844 KB
testcase_17 AC 323 ms
6,008 KB
testcase_18 AC 322 ms
5,980 KB
権限があれば一括ダウンロードができます

ソースコード

diff #

N, M = map(int, raw_input().split())
deg = [0 for _ in xrange(N)]
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