結果

問題 No.583 鉄道同好会
ユーザー Mr.FukuMr.Fuku
提出日時 2018-07-17 22:49:14
言語 Python3
(3.12.2 + numpy 1.26.4 + scipy 1.12.0)
結果
WA  
実行時間 -
コード長 261 bytes
コンパイル時間 130 ms
コンパイル使用メモリ 10,660 KB
実行使用メモリ 7,972 KB
最終ジャッジ日時 2023-08-18 07:22:06
合計ジャッジ時間 7,225 ms
ジャッジサーバーID
(参考情報)
judge11 / judge12
このコードへのチャレンジ
(要ログイン)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 17 ms
7,772 KB
testcase_01 AC 17 ms
7,892 KB
testcase_02 AC 16 ms
7,932 KB
testcase_03 AC 15 ms
7,864 KB
testcase_04 WA -
testcase_05 AC 16 ms
7,776 KB
testcase_06 AC 16 ms
7,888 KB
testcase_07 AC 16 ms
7,944 KB
testcase_08 AC 15 ms
7,772 KB
testcase_09 AC 15 ms
7,972 KB
testcase_10 AC 18 ms
7,864 KB
testcase_11 AC 306 ms
7,820 KB
testcase_12 AC 413 ms
7,868 KB
testcase_13 AC 413 ms
7,880 KB
testcase_14 AC 413 ms
7,860 KB
testcase_15 AC 530 ms
7,796 KB
testcase_16 AC 995 ms
7,932 KB
testcase_17 AC 1,210 ms
7,864 KB
testcase_18 AC 1,201 ms
7,864 KB
権限があれば一括ダウンロードができます

ソースコード

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