結果

問題 No.2403 "Eight" Bridges of Königsberg
ユーザー lloyzlloyz
提出日時 2023-08-05 14:20:10
言語 PyPy3
(7.3.15)
結果
WA  
実行時間 -
コード長 231 bytes
コンパイル時間 200 ms
コンパイル使用メモリ 82,116 KB
実行使用メモリ 76,668 KB
最終ジャッジ日時 2024-04-23 11:28:46
合計ジャッジ時間 3,734 ms
ジャッジサーバーID
(参考情報)
judge2 / judge1
このコードへのチャレンジ
(要ログイン)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 33 ms
53,268 KB
testcase_01 AC 35 ms
52,228 KB
testcase_02 AC 37 ms
53,144 KB
testcase_03 AC 36 ms
52,736 KB
testcase_04 AC 103 ms
76,264 KB
testcase_05 AC 133 ms
76,460 KB
testcase_06 AC 129 ms
76,316 KB
testcase_07 AC 101 ms
76,044 KB
testcase_08 AC 112 ms
76,240 KB
testcase_09 AC 146 ms
76,272 KB
testcase_10 AC 135 ms
76,668 KB
testcase_11 AC 118 ms
76,280 KB
testcase_12 AC 142 ms
76,192 KB
testcase_13 AC 117 ms
76,104 KB
testcase_14 WA -
testcase_15 WA -
testcase_16 WA -
testcase_17 WA -
testcase_18 WA -
testcase_19 AC 39 ms
60,016 KB
testcase_20 AC 36 ms
59,924 KB
testcase_21 AC 38 ms
59,452 KB
testcase_22 AC 37 ms
59,724 KB
testcase_23 AC 37 ms
59,976 KB
testcase_24 AC 43 ms
61,104 KB
testcase_25 AC 39 ms
60,152 KB
testcase_26 WA -
testcase_27 WA -
testcase_28 AC 65 ms
69,820 KB
testcase_29 WA -
testcase_30 AC 46 ms
63,228 KB
testcase_31 AC 59 ms
71,616 KB
testcase_32 WA -
testcase_33 WA -
testcase_34 WA -
権限があれば一括ダウンロードができます

ソースコード

diff #

n, m = map(int, input().split())
C = [0 for _ in range(n)]
for _ in range(m):
    u, v = map(int, input().split())
    u -= 1
    v -= 1
    C[u] -= 1
    C[v] += 1
ans = 0
for i in range(n):
    ans += max(C[i], 0)
print(ans - 1)
0