結果

問題 No.2154 あさかつの参加人数
ユーザー sepa38sepa38
提出日時 2022-12-09 21:24:51
言語 PyPy3
(7.3.15)
結果
AC  
実行時間 443 ms / 2,000 ms
コード長 213 bytes
コンパイル時間 279 ms
コンパイル使用メモリ 87,052 KB
実行使用メモリ 98,852 KB
最終ジャッジ日時 2023-08-04 21:29:03
合計ジャッジ時間 12,557 ms
ジャッジサーバーID
(参考情報)
judge11 / judge13
このコードへのチャレンジ(β)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 435 ms
98,464 KB
testcase_01 AC 431 ms
98,852 KB
testcase_02 AC 443 ms
98,800 KB
testcase_03 AC 429 ms
98,620 KB
testcase_04 AC 434 ms
98,612 KB
testcase_05 AC 243 ms
77,832 KB
testcase_06 AC 353 ms
86,200 KB
testcase_07 AC 264 ms
90,176 KB
testcase_08 AC 252 ms
91,824 KB
testcase_09 AC 138 ms
85,896 KB
testcase_10 AC 244 ms
88,944 KB
testcase_11 AC 394 ms
96,152 KB
testcase_12 AC 322 ms
89,436 KB
testcase_13 AC 229 ms
81,900 KB
testcase_14 AC 339 ms
88,816 KB
testcase_15 AC 239 ms
90,920 KB
testcase_16 AC 342 ms
91,228 KB
testcase_17 AC 367 ms
89,120 KB
testcase_18 AC 389 ms
92,708 KB
testcase_19 AC 114 ms
78,964 KB
testcase_20 AC 315 ms
92,940 KB
testcase_21 AC 130 ms
84,972 KB
testcase_22 AC 157 ms
92,464 KB
testcase_23 AC 360 ms
92,920 KB
testcase_24 AC 397 ms
95,800 KB
権限があれば一括ダウンロードができます

ソースコード

diff #

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