結果

問題 No.2154 あさかつの参加人数
ユーザー ああいいああいい
提出日時 2022-12-11 12:57:36
言語 PyPy3
(7.3.15)
結果
AC  
実行時間 442 ms / 2,000 ms
コード長 226 bytes
コンパイル時間 442 ms
コンパイル使用メモリ 82,304 KB
実行使用メモリ 81,024 KB
最終ジャッジ日時 2024-04-23 10:14:40
合計ジャッジ時間 12,893 ms
ジャッジサーバーID
(参考情報)
judge5 / judge4
このコードへのチャレンジ
(要ログイン)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 441 ms
80,512 KB
testcase_01 AC 442 ms
80,512 KB
testcase_02 AC 434 ms
81,024 KB
testcase_03 AC 439 ms
80,256 KB
testcase_04 AC 436 ms
80,128 KB
testcase_05 AC 247 ms
76,416 KB
testcase_06 AC 379 ms
78,208 KB
testcase_07 AC 257 ms
79,104 KB
testcase_08 AC 246 ms
79,488 KB
testcase_09 AC 121 ms
78,720 KB
testcase_10 AC 240 ms
78,464 KB
testcase_11 AC 392 ms
80,384 KB
testcase_12 AC 331 ms
79,232 KB
testcase_13 AC 231 ms
77,184 KB
testcase_14 AC 367 ms
78,592 KB
testcase_15 AC 233 ms
78,976 KB
testcase_16 AC 339 ms
79,104 KB
testcase_17 AC 388 ms
78,976 KB
testcase_18 AC 398 ms
79,488 KB
testcase_19 AC 106 ms
76,672 KB
testcase_20 AC 326 ms
79,744 KB
testcase_21 AC 114 ms
78,336 KB
testcase_22 AC 146 ms
80,128 KB
testcase_23 AC 373 ms
79,232 KB
testcase_24 AC 412 ms
80,256 KB
権限があれば一括ダウンロードができます

ソースコード

diff #

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