結果

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

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 447 ms
80,512 KB
testcase_01 AC 435 ms
80,640 KB
testcase_02 AC 438 ms
80,768 KB
testcase_03 AC 435 ms
81,024 KB
testcase_04 AC 434 ms
80,896 KB
testcase_05 AC 242 ms
76,544 KB
testcase_06 AC 381 ms
78,336 KB
testcase_07 AC 256 ms
79,360 KB
testcase_08 AC 241 ms
79,360 KB
testcase_09 AC 123 ms
78,208 KB
testcase_10 AC 239 ms
78,848 KB
testcase_11 AC 392 ms
80,384 KB
testcase_12 AC 330 ms
79,104 KB
testcase_13 AC 234 ms
77,312 KB
testcase_14 AC 355 ms
78,208 KB
testcase_15 AC 238 ms
79,360 KB
testcase_16 AC 334 ms
79,232 KB
testcase_17 AC 382 ms
78,720 KB
testcase_18 AC 395 ms
79,744 KB
testcase_19 AC 103 ms
76,672 KB
testcase_20 AC 323 ms
79,360 KB
testcase_21 AC 115 ms
78,592 KB
testcase_22 AC 146 ms
80,256 KB
testcase_23 AC 365 ms
79,616 KB
testcase_24 AC 402 ms
80,128 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