結果

問題 No.583 鉄道同好会
コンテスト
ユーザー wajima_wataru
提出日時 2018-01-03 20:14:19
言語 Python3
(3.14.2 + numpy 2.4.0 + scipy 1.16.3)
結果
WA  
実行時間 -
コード長 254 bytes
記録
記録タグの例:
初AC ショートコード 純ショートコード 純主流ショートコード 最速実行時間
コンパイル時間 100 ms
コンパイル使用メモリ 12,544 KB
実行使用メモリ 10,880 KB
最終ジャッジ日時 2024-12-23 02:26:35
合計ジャッジ時間 3,859 ms
ジャッジサーバーID
(参考情報)
judge5 / judge3
このコードへのチャレンジ
(要ログイン)
ファイルパターン 結果
sample AC * 3
other AC * 15 WA * 1
権限があれば一括ダウンロードができます

ソースコード

diff #
raw source code

N, M = map(int, input().split())
S = [True for _ in range(N)]
for _ in range(M):
    a, b = map(int, input().split())
    S[a] = not(S[a]) 
    S[b] = not(S[b]) 
count = 0
for s in S:
    if not s:
        count += 1
print('YES' if count <= 2 else 'NO')
0