結果

問題 No.2403 "Eight" Bridges of Königsberg
ユーザー Mottchan
提出日時 2023-08-04 22:22:52
言語 PyPy3
(7.3.15)
結果
WA  
実行時間 -
コード長 253 bytes
コンパイル時間 179 ms
コンパイル使用メモリ 82,768 KB
実行使用メモリ 81,136 KB
最終ジャッジ日時 2024-10-14 20:23:15
合計ジャッジ時間 4,575 ms
ジャッジサーバーID
(参考情報)
judge3 / judge2
このコードへのチャレンジ
(要ログイン)
ファイルパターン 結果
sample AC * 4
other WA * 31
権限があれば一括ダウンロードができます

ソースコード

diff #

n,m = map(int,input().split())
graph=[[] for _ in range(n)]
for i in range(m):
    a,b = map(int,input().split())
    graph[a-1].append(b-1)

c1=0
c2=0
for i in range(n):
    if len(graph[i])%2==1:
        c1+=1
    else:
        c2+=1

print(abs(c1-2))
0