結果

問題 No.2154 あさかつの参加人数
ユーザー tomoyawatomoyawa
提出日時 2023-01-02 19:17:42
言語 PyPy3
(7.3.15)
結果
AC  
実行時間 506 ms / 2,000 ms
コード長 263 bytes
コンパイル時間 412 ms
コンパイル使用メモリ 82,432 KB
実行使用メモリ 124,688 KB
最終ジャッジ日時 2024-11-27 01:13:23
合計ジャッジ時間 13,905 ms
ジャッジサーバーID
(参考情報)
judge4 / judge3
このコードへのチャレンジ
(要ログイン)
ファイルパターン 結果
other AC * 25
権限があれば一括ダウンロードができます

ソースコード

diff #

N,M=map(int,input().split())
rl=[tuple(map(int,input().split())) for _ in range(M)]
cul=[0]*(N+2)
for t in rl:
    right,left=t
    cul[left]+=1
    cul[right+1]-=1
for i in range(1,N+2):
    cul[i]+=cul[i-1]
for idx in reversed(range(1,N+1)):
    print(cul[idx])
0