結果
| 問題 |
No.2403 "Eight" Bridges of Königsberg
|
| コンテスト | |
| ユーザー |
ikoma
|
| 提出日時 | 2023-08-04 22:02:14 |
| 言語 | PyPy3 (7.3.15) |
| 結果 |
WA
|
| 実行時間 | - |
| コード長 | 221 bytes |
| コンパイル時間 | 165 ms |
| コンパイル使用メモリ | 82,296 KB |
| 実行使用メモリ | 76,252 KB |
| 最終ジャッジ日時 | 2024-10-14 19:59:36 |
| 合計ジャッジ時間 | 3,326 ms |
|
ジャッジサーバーID (参考情報) |
judge3 / judge4 |
(要ログイン)
| ファイルパターン | 結果 |
|---|---|
| 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