結果

問題 No.2154 あさかつの参加人数
コンテスト
ユーザー Kohei
提出日時 2026-06-23 18:56:06
言語 PyPy3
(7.3.17)
コンパイル:
pypy3 -mpy_compile _filename_
実行:
pypy3 _filename_
結果
AC  
実行時間 303 ms / 2,000 ms
コード長 251 bytes
記録
記録タグの例:
初AC ショートコード 純ショートコード 純主流ショートコード 最速実行時間
コンパイル時間 337 ms
コンパイル使用メモリ 84,912 KB
実行使用メモリ 98,548 KB
最終ジャッジ日時 2026-06-23 18:56:23
合計ジャッジ時間 12,988 ms
ジャッジサーバーID
(参考情報)
judge2_0 / judge1_1
このコードへのチャレンジ
(要ログイン)
ファイルパターン 結果
other AC * 25
権限があれば一括ダウンロードができます

ソースコード

diff #
raw source code

N, M = map(int, input().split())
cnt = [0] * (N + 2)
for i in range(M):
    l, r = map(int, input().split())
    cnt[r] += 1
    cnt[l + 1] -= 1

for i in range(N + 1):
    cnt[i + 1] += cnt[i]
cnt.pop()
cnt.reverse()
cnt.pop()
print(*cnt, sep='\n')

0