結果

問題 No.2154 あさかつの参加人数
ユーザー qibqib
提出日時 2023-05-11 20:12:13
言語 PyPy3
(7.3.15)
結果
AC  
実行時間 466 ms / 2,000 ms
コード長 224 bytes
コンパイル時間 860 ms
コンパイル使用メモリ 86,864 KB
実行使用メモリ 102,744 KB
最終ジャッジ日時 2023-08-18 11:50:44
合計ジャッジ時間 17,722 ms
ジャッジサーバーID
(参考情報)
judge15 / judge11
このコードへのチャレンジ
(要ログイン)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 466 ms
102,724 KB
testcase_01 AC 459 ms
102,744 KB
testcase_02 AC 445 ms
102,320 KB
testcase_03 AC 458 ms
102,268 KB
testcase_04 AC 457 ms
102,732 KB
testcase_05 AC 236 ms
77,476 KB
testcase_06 AC 351 ms
88,068 KB
testcase_07 AC 259 ms
92,776 KB
testcase_08 AC 263 ms
94,872 KB
testcase_09 AC 148 ms
88,060 KB
testcase_10 AC 246 ms
91,348 KB
testcase_11 AC 418 ms
99,336 KB
testcase_12 AC 330 ms
91,976 KB
testcase_13 AC 249 ms
82,680 KB
testcase_14 AC 353 ms
91,308 KB
testcase_15 AC 260 ms
93,824 KB
testcase_16 AC 351 ms
94,024 KB
testcase_17 AC 410 ms
91,356 KB
testcase_18 AC 399 ms
95,352 KB
testcase_19 AC 114 ms
79,604 KB
testcase_20 AC 346 ms
95,828 KB
testcase_21 AC 142 ms
86,700 KB
testcase_22 AC 177 ms
95,996 KB
testcase_23 AC 394 ms
95,668 KB
testcase_24 AC 417 ms
99,204 KB
権限があれば一括ダウンロードができます

ソースコード

diff #

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

dp = [0 for _ in range(n + 1)]
for _ in range(m):
  l, r = map(int, input().split())
  r -= 1
  dp[r] += 1
  dp[l] -= 1

for i in range(n):
  dp[i + 1] += dp[i]

print(*dp[-2::-1], sep="\n")
0