結果

問題 No.583 鉄道同好会
ユーザー wajima_wataru
提出日時 2018-01-03 20:14:19
言語 Python3
(3.13.1 + numpy 2.2.1 + scipy 1.14.1)
結果
WA  
実行時間 -
コード長 254 bytes
コンパイル時間 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 #

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