結果

問題 No.2403 "Eight" Bridges of Königsberg
ユーザー ikomaikoma
提出日時 2023-08-04 22:02:14
言語 PyPy3
(7.3.15)
結果
WA  
実行時間 -
コード長 221 bytes
コンパイル時間 329 ms
コンパイル使用メモリ 82,048 KB
実行使用メモリ 76,160 KB
最終ジャッジ日時 2024-04-22 20:19:34
合計ジャッジ時間 3,593 ms
ジャッジサーバーID
(参考情報)
judge2 / judge5
このコードへのチャレンジ
(要ログイン)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 41 ms
51,712 KB
testcase_01 AC 40 ms
52,096 KB
testcase_02 AC 40 ms
51,584 KB
testcase_03 AC 41 ms
51,968 KB
testcase_04 AC 84 ms
75,776 KB
testcase_05 AC 99 ms
75,776 KB
testcase_06 AC 105 ms
76,032 KB
testcase_07 AC 86 ms
75,392 KB
testcase_08 AC 92 ms
75,904 KB
testcase_09 AC 109 ms
76,160 KB
testcase_10 AC 103 ms
76,032 KB
testcase_11 AC 94 ms
76,032 KB
testcase_12 AC 104 ms
75,904 KB
testcase_13 AC 91 ms
75,904 KB
testcase_14 WA -
testcase_15 WA -
testcase_16 WA -
testcase_17 WA -
testcase_18 AC 41 ms
51,584 KB
testcase_19 AC 47 ms
60,288 KB
testcase_20 AC 45 ms
57,984 KB
testcase_21 AC 47 ms
58,752 KB
testcase_22 AC 46 ms
59,776 KB
testcase_23 AC 46 ms
59,648 KB
testcase_24 AC 49 ms
60,416 KB
testcase_25 AC 46 ms
59,264 KB
testcase_26 WA -
testcase_27 WA -
testcase_28 AC 58 ms
65,024 KB
testcase_29 WA -
testcase_30 AC 48 ms
59,648 KB
testcase_31 AC 56 ms
65,024 KB
testcase_32 WA -
testcase_33 WA -
testcase_34 WA -
権限があれば一括ダウンロードができます

ソースコード

diff #

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))
0