結果
| 問題 | No.2403 "Eight" Bridges of Königsberg |
| コンテスト | |
| ユーザー |
ikoma
|
| 提出日時 | 2023-08-04 22:02:14 |
| 言語 | PyPy3 (7.3.17) |
| 結果 |
WA
|
| 実行時間 | - |
| コード長 | 221 bytes |
| 記録 | |
| コンパイル時間 | 140 ms |
| コンパイル使用メモリ | 85,376 KB |
| 実行使用メモリ | 81,024 KB |
| 最終ジャッジ日時 | 2026-05-02 05:30:40 |
| 合計ジャッジ時間 | 2,744 ms |
|
ジャッジサーバーID (参考情報) |
judge2_0 / judge3_0 |
(要ログイン)
| ファイルパターン | 結果 |
|---|---|
| sample | AC * 4 |
| other | AC * 21 WA * 10 |
ソースコード
import sys
input = sys.stdin.readline
N,M=map(int,input().split())
dif = [0]*N
for _ in range(M):
u,v=map(lambda x:int(x)-1,input().split())
dif[u]+=1
dif[v]-=1
print(max(sum([abs(d) for d in dif])//2-1,0))
ikoma