結果

問題 No.2154 あさかつの参加人数
ユーザー tomoyawatomoyawa
提出日時 2023-01-02 19:17:42
言語 PyPy3
(7.3.15)
結果
AC  
実行時間 590 ms / 2,000 ms
コード長 263 bytes
コンパイル時間 319 ms
コンパイル使用メモリ 87,036 KB
実行使用メモリ 125,664 KB
最終ジャッジ日時 2023-08-17 23:47:22
合計ジャッジ時間 15,871 ms
ジャッジサーバーID
(参考情報)
judge14 / judge11
このコードへのチャレンジ
(要ログイン)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 590 ms
125,300 KB
testcase_01 AC 582 ms
125,548 KB
testcase_02 AC 577 ms
125,076 KB
testcase_03 AC 580 ms
125,664 KB
testcase_04 AC 586 ms
125,468 KB
testcase_05 AC 411 ms
108,904 KB
testcase_06 AC 525 ms
119,800 KB
testcase_07 AC 342 ms
100,484 KB
testcase_08 AC 314 ms
98,244 KB
testcase_09 AC 153 ms
82,336 KB
testcase_10 AC 307 ms
98,456 KB
testcase_11 AC 515 ms
118,996 KB
testcase_12 AC 442 ms
111,380 KB
testcase_13 AC 329 ms
100,296 KB
testcase_14 AC 479 ms
115,732 KB
testcase_15 AC 303 ms
97,364 KB
testcase_16 AC 454 ms
112,340 KB
testcase_17 AC 531 ms
120,072 KB
testcase_18 AC 532 ms
120,392 KB
testcase_19 AC 142 ms
79,928 KB
testcase_20 AC 438 ms
110,192 KB
testcase_21 AC 144 ms
80,472 KB
testcase_22 AC 174 ms
84,132 KB
testcase_23 AC 499 ms
116,456 KB
testcase_24 AC 546 ms
121,372 KB
権限があれば一括ダウンロードができます

ソースコード

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