結果

問題 No.2154 あさかつの参加人数
ユーザー tamlog06
提出日時 2022-12-09 21:33:08
言語 PyPy3
(7.3.15)
結果
AC  
実行時間 1,182 ms / 2,000 ms
コード長 268 bytes
コンパイル時間 220 ms
コンパイル使用メモリ 82,096 KB
実行使用メモリ 220,500 KB
最終ジャッジ日時 2024-10-14 20:42:26
合計ジャッジ時間 24,411 ms
ジャッジサーバーID
(参考情報)
judge2 / judge5
このコードへのチャレンジ
(要ログイン)
ファイルパターン 結果
other AC * 25
権限があれば一括ダウンロードができます

ソースコード

diff #

N, M = map(int, input().split())
from collections import defaultdict
L, R = defaultdict(int), defaultdict(int)

for i in range(M):
    l, r = map(int, input().split())
    L[l] += 1
    R[r-1] += 1

n = 0
for i in range(N, 0, -1):
    n = n + L[i] - R[i]
    print(n)
0