結果

問題 No.2154 あさかつの参加人数
ユーザー だれだれ
提出日時 2022-12-09 21:30:28
言語 PyPy3
(7.3.15)
結果
AC  
実行時間 392 ms / 2,000 ms
コード長 232 bytes
コンパイル時間 262 ms
コンパイル使用メモリ 82,452 KB
実行使用メモリ 137,684 KB
最終ジャッジ日時 2024-04-22 20:46:21
合計ジャッジ時間 11,363 ms
ジャッジサーバーID
(参考情報)
judge3 / judge5
このコードへのチャレンジ
(要ログイン)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 392 ms
137,604 KB
testcase_01 AC 377 ms
137,532 KB
testcase_02 AC 387 ms
137,628 KB
testcase_03 AC 387 ms
137,588 KB
testcase_04 AC 378 ms
137,684 KB
testcase_05 AC 199 ms
76,848 KB
testcase_06 AC 300 ms
96,544 KB
testcase_07 AC 226 ms
114,284 KB
testcase_08 AC 236 ms
119,184 KB
testcase_09 AC 114 ms
104,436 KB
testcase_10 AC 216 ms
110,336 KB
testcase_11 AC 350 ms
118,664 KB
testcase_12 AC 296 ms
104,308 KB
testcase_13 AC 189 ms
89,236 KB
testcase_14 AC 295 ms
109,664 KB
testcase_15 AC 219 ms
118,464 KB
testcase_16 AC 296 ms
115,740 KB
testcase_17 AC 319 ms
109,712 KB
testcase_18 AC 348 ms
119,756 KB
testcase_19 AC 80 ms
81,464 KB
testcase_20 AC 293 ms
123,392 KB
testcase_21 AC 106 ms
103,408 KB
testcase_22 AC 146 ms
127,688 KB
testcase_23 AC 323 ms
120,640 KB
testcase_24 AC 358 ms
130,236 KB
権限があれば一括ダウンロードができます

ソースコード

diff #

n, m = map(int, input().split())
p = [0] * (n + 1)
for i in range(m):
    r, l = map(int, input().split())
    p[l - 1] += 1
    p[r] -= 1
v = []
for j in range(n):
    v.append(p[j])
    p[j + 1] += p[j]
print(*v[::-1], sep = "\n")
0