結果

問題 No.583 鉄道同好会
ユーザー Mr.Fuku
提出日時 2018-07-17 22:49:14
言語 Python3
(3.13.1 + numpy 2.2.1 + scipy 1.14.1)
結果
WA  
実行時間 -
コード長 261 bytes
コンパイル時間 80 ms
コンパイル使用メモリ 12,544 KB
実行使用メモリ 10,752 KB
最終ジャッジ日時 2024-11-27 11:01:07
合計ジャッジ時間 8,899 ms
ジャッジサーバーID
(参考情報)
judge5 / judge1
このコードへのチャレンジ
(要ログイン)
ファイルパターン 結果
sample AC * 3
other AC * 15 WA * 1
権限があれば一括ダウンロードができます

ソースコード

diff #

N,M = map(int,input().split())
station = []
for i in range(M):
    s,t = map(int,input().split())
    station.remove(s) if s in station else station.append(s)
    station.remove(t) if t in station else station.append(t)
print("YES" if len(station)<=2 else "NO")
0