結果

問題 No.2403 "Eight" Bridges of Königsberg
ユーザー ニックネームニックネーム
提出日時 2023-08-04 21:50:28
言語 Python3
(3.12.2 + numpy 1.26.4 + scipy 1.12.0)
結果
WA  
実行時間 -
コード長 212 bytes
コンパイル時間 239 ms
コンパイル使用メモリ 12,672 KB
実行使用メモリ 13,312 KB
最終ジャッジ日時 2024-04-22 20:09:35
合計ジャッジ時間 7,624 ms
ジャッジサーバーID
(参考情報)
judge5 / judge2
このコードへのチャレンジ
(要ログイン)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 33 ms
10,752 KB
testcase_01 AC 33 ms
10,752 KB
testcase_02 AC 31 ms
10,752 KB
testcase_03 AC 30 ms
10,752 KB
testcase_04 AC 310 ms
10,752 KB
testcase_05 AC 562 ms
11,136 KB
testcase_06 AC 599 ms
11,008 KB
testcase_07 AC 385 ms
10,880 KB
testcase_08 AC 429 ms
11,008 KB
testcase_09 AC 658 ms
11,008 KB
testcase_10 AC 641 ms
10,880 KB
testcase_11 AC 482 ms
10,880 KB
testcase_12 AC 649 ms
10,880 KB
testcase_13 AC 434 ms
10,880 KB
testcase_14 WA -
testcase_15 WA -
testcase_16 WA -
testcase_17 WA -
testcase_18 AC 30 ms
10,880 KB
testcase_19 AC 54 ms
13,312 KB
testcase_20 AC 35 ms
11,136 KB
testcase_21 AC 43 ms
11,904 KB
testcase_22 AC 52 ms
12,928 KB
testcase_23 AC 50 ms
12,928 KB
testcase_24 AC 49 ms
12,416 KB
testcase_25 AC 45 ms
12,416 KB
testcase_26 WA -
testcase_27 WA -
testcase_28 AC 55 ms
12,544 KB
testcase_29 WA -
testcase_30 AC 41 ms
11,776 KB
testcase_31 AC 58 ms
13,184 KB
testcase_32 WA -
testcase_33 WA -
testcase_34 WA -
権限があれば一括ダウンロードができます

ソースコード

diff #

n,m = map(int,input().split())
a = [0]*n; b = [0]*n; c = []
for _ in range(m):
    u,v = map(int,input().split())
    a[u-1] += 1; b[v-1] += 1
for u,v in zip(a,b):
    if u>v: c.append(u-v)
print(max(sum(c)-1,0))
0