結果
問題 |
No.2403 "Eight" Bridges of Königsberg
|
ユーザー |
|
提出日時 | 2023-08-04 22:18:46 |
言語 | PyPy3 (7.3.15) |
結果 |
WA
|
実行時間 | - |
コード長 | 260 bytes |
コンパイル時間 | 274 ms |
コンパイル使用メモリ | 82,276 KB |
実行使用メモリ | 76,648 KB |
最終ジャッジ日時 | 2024-10-14 20:17:42 |
合計ジャッジ時間 | 4,174 ms |
ジャッジサーバーID (参考情報) |
judge2 / judge5 |
(要ログイン)
ファイルパターン | 結果 |
---|---|
sample | AC * 4 |
other | AC * 21 WA * 10 |
ソースコード
n, m = map(int, input().split()) in_ = [0] * n out_ = [0] * n for _ in range(m): u, v = map(int, input().split()) u -= 1 v -= 1 in_[v] += 1 out_[u] += 1 tot = 0 for i, o in zip(in_, out_): tot += max(0, i - o) print(max(0, tot - 1))