結果
| 問題 |
No.2403 "Eight" Bridges of Königsberg
|
| コンテスト | |
| ユーザー |
ikoma
|
| 提出日時 | 2023-08-04 21:58:55 |
| 言語 | PyPy3 (7.3.15) |
| 結果 |
WA
|
| 実行時間 | - |
| コード長 | 213 bytes |
| コンパイル時間 | 157 ms |
| コンパイル使用メモリ | 81,920 KB |
| 実行使用メモリ | 76,288 KB |
| 最終ジャッジ日時 | 2024-10-14 19:55:04 |
| 合計ジャッジ時間 | 3,278 ms |
|
ジャッジサーバーID (参考情報) |
judge4 / judge3 |
(要ログイン)
| ファイルパターン | 結果 |
|---|---|
| sample | AC * 4 |
| other | AC * 20 WA * 11 |
ソースコード
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(sum([abs(d) for d in dif])//2-1)
ikoma