結果

問題 No.2154 あさかつの参加人数
ユーザー lloyzlloyz
提出日時 2022-12-09 22:50:56
言語 PyPy3
(7.3.15)
結果
AC  
実行時間 404 ms / 2,000 ms
コード長 247 bytes
コンパイル時間 185 ms
コンパイル使用メモリ 82,320 KB
実行使用メモリ 101,664 KB
最終ジャッジ日時 2024-04-22 22:49:29
合計ジャッジ時間 11,021 ms
ジャッジサーバーID
(参考情報)
judge4 / judge3
このコードへのチャレンジ
(要ログイン)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 404 ms
101,664 KB
testcase_01 AC 382 ms
101,596 KB
testcase_02 AC 382 ms
101,564 KB
testcase_03 AC 385 ms
101,456 KB
testcase_04 AC 382 ms
101,548 KB
testcase_05 AC 205 ms
76,272 KB
testcase_06 AC 295 ms
87,508 KB
testcase_07 AC 219 ms
91,868 KB
testcase_08 AC 213 ms
94,180 KB
testcase_09 AC 103 ms
86,968 KB
testcase_10 AC 201 ms
90,140 KB
testcase_11 AC 341 ms
98,876 KB
testcase_12 AC 276 ms
90,828 KB
testcase_13 AC 192 ms
82,216 KB
testcase_14 AC 305 ms
90,520 KB
testcase_15 AC 202 ms
93,132 KB
testcase_16 AC 293 ms
93,276 KB
testcase_17 AC 327 ms
90,164 KB
testcase_18 AC 339 ms
95,196 KB
testcase_19 AC 79 ms
78,524 KB
testcase_20 AC 285 ms
95,412 KB
testcase_21 AC 96 ms
85,880 KB
testcase_22 AC 129 ms
95,256 KB
testcase_23 AC 313 ms
95,224 KB
testcase_24 AC 358 ms
98,272 KB
権限があれば一括ダウンロードができます

ソースコード

diff #

n, m = map(int, input().split())

ANS = [0 for _ in range(n + 2)]
for _ in range(m):
    l, r = map(int, input().split())
    ANS[r] += 1
    ANS[l + 1] -= 1
for i in range(n):
    ANS[i + 1] += ANS[i]
ANS.reverse()
print(*ANS[1:n + 1], sep='\n')
0