結果

問題 No.3648 Overbooked Meeting Rooms
コンテスト
ユーザー 👑 loop0919
提出日時 2026-08-28 21:25:22
言語 PyPy3
(7.3.17)
コンパイル:
pypy3 -mpy_compile _filename_
実行:
pypy3 _filename_
結果
AC  
実行時間 89 ms / 2,000 ms
+ 341µs
コード長 249 bytes
記録
記録タグの例:
初AC ショートコード 純ショートコード 純主流ショートコード 最速実行時間
コンパイル時間 255 ms
コンパイル使用メモリ 96,360 KB
実行使用メモリ 79,616 KB
最終ジャッジ日時 2026-08-28 21:25:39
合計ジャッジ時間 4,643 ms
ジャッジサーバーID
(参考情報)
judge2_0 / judge3_0
このコードへのチャレンジ
(要ログイン)
ファイルパターン 結果
sample AC * 3
other AC * 30
権限があれば一括ダウンロードができます

ソースコード

diff #
raw source code

from collections import Counter

N, M = [int(s) for s in input().split()]
A = [int(s) for s in input().split()]
B = [int(s) for s in input().split()]

cnt_a = Counter(A)
ans = 0

for i in range(M):
    ans += max(cnt_a[i + 1] - B[i], 0)

print(ans)
0