結果

問題 No.2403 "Eight" Bridges of Königsberg
ユーザー rlangevinrlangevin
提出日時 2023-08-06 17:46:28
言語 PyPy3
(7.3.15)
結果
WA  
実行時間 -
コード長 287 bytes
コンパイル時間 408 ms
コンパイル使用メモリ 82,176 KB
実行使用メモリ 76,288 KB
最終ジャッジ日時 2024-04-24 12:40:13
合計ジャッジ時間 4,132 ms
ジャッジサーバーID
(参考情報)
judge5 / judge4
このコードへのチャレンジ
(要ログイン)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 41 ms
51,456 KB
testcase_01 AC 40 ms
51,456 KB
testcase_02 AC 42 ms
51,456 KB
testcase_03 AC 41 ms
51,840 KB
testcase_04 AC 82 ms
75,904 KB
testcase_05 AC 99 ms
75,520 KB
testcase_06 AC 106 ms
76,032 KB
testcase_07 AC 86 ms
75,648 KB
testcase_08 AC 90 ms
76,032 KB
testcase_09 AC 106 ms
75,520 KB
testcase_10 AC 101 ms
76,288 KB
testcase_11 AC 93 ms
75,904 KB
testcase_12 AC 105 ms
75,520 KB
testcase_13 AC 92 ms
75,648 KB
testcase_14 WA -
testcase_15 WA -
testcase_16 WA -
testcase_17 WA -
testcase_18 AC 40 ms
51,712 KB
testcase_19 AC 49 ms
60,672 KB
testcase_20 AC 48 ms
58,880 KB
testcase_21 AC 48 ms
59,904 KB
testcase_22 AC 48 ms
60,416 KB
testcase_23 AC 49 ms
60,416 KB
testcase_24 AC 49 ms
60,544 KB
testcase_25 AC 46 ms
59,264 KB
testcase_26 WA -
testcase_27 WA -
testcase_28 AC 57 ms
63,744 KB
testcase_29 WA -
testcase_30 AC 50 ms
59,904 KB
testcase_31 AC 57 ms
64,768 KB
testcase_32 WA -
testcase_33 WA -
testcase_34 WA -
権限があれば一括ダウンロードができます

ソースコード

diff #

import sys
input = sys.stdin.readline

N, M = map(int, input().split())
S, T = [0] * N, [0] * N
for i in range(M):
    u, v = map(int, input().split())
    u, v = u - 1, v - 1
    S[u] += 1
    T[v] += 1
    
ans = 0
for i in range(N):
    ans += max(0, S[i] - T[i])
print(max(0, ans-1))
0