結果

問題 No.583 鉄道同好会
ユーザー mbanmban
提出日時 2017-11-01 14:22:51
言語 Python3
(3.11.6 + numpy 1.26.0 + scipy 1.11.3)
結果
WA  
実行時間 -
コード長 244 bytes
コンパイル時間 98 ms
コンパイル使用メモリ 10,584 KB
実行使用メモリ 7,960 KB
最終ジャッジ日時 2023-08-14 16:02:35
合計ジャッジ時間 3,058 ms
ジャッジサーバーID
(参考情報)
judge15 / judge14
このコードへのチャレンジ(β)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 16 ms
7,764 KB
testcase_01 AC 16 ms
7,904 KB
testcase_02 AC 16 ms
7,936 KB
testcase_03 AC 16 ms
7,764 KB
testcase_04 WA -
testcase_05 AC 16 ms
7,904 KB
testcase_06 AC 16 ms
7,772 KB
testcase_07 AC 16 ms
7,760 KB
testcase_08 AC 16 ms
7,952 KB
testcase_09 AC 16 ms
7,812 KB
testcase_10 AC 17 ms
7,768 KB
testcase_11 AC 97 ms
7,904 KB
testcase_12 AC 121 ms
7,752 KB
testcase_13 AC 120 ms
7,836 KB
testcase_14 AC 121 ms
7,672 KB
testcase_15 AC 153 ms
7,748 KB
testcase_16 AC 276 ms
7,752 KB
testcase_17 AC 338 ms
7,764 KB
testcase_18 AC 336 ms
7,884 KB
権限があれば一括ダウンロードができます

ソースコード

diff #

def l():
    return map(int,input().split())

n,m=l()
ar=[0 for i in range(n)]

for i in range(m):
    sa,sb=l()
    ar[sa]+=1
    ar[sb]+=1

cnt=0

for i in ar:
    if i%2==1:
        cnt+=1
        
print('YES' if (cnt==0)or(cnt==2) else'NO')
0