結果

問題 No.2154 あさかつの参加人数
ユーザー Taku000Taku000
提出日時 2023-01-28 15:24:49
言語 PyPy3
(7.3.15)
結果
AC  
実行時間 443 ms / 2,000 ms
コード長 248 bytes
コンパイル時間 1,468 ms
コンパイル使用メモリ 86,648 KB
実行使用メモリ 82,248 KB
最終ジャッジ日時 2023-09-11 04:26:01
合計ジャッジ時間 19,524 ms
ジャッジサーバーID
(参考情報)
judge14 / judge12
このコードへのチャレンジ
(要ログイン)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 439 ms
82,016 KB
testcase_01 AC 442 ms
82,136 KB
testcase_02 AC 443 ms
82,240 KB
testcase_03 AC 432 ms
82,148 KB
testcase_04 AC 440 ms
82,248 KB
testcase_05 AC 268 ms
78,032 KB
testcase_06 AC 391 ms
79,868 KB
testcase_07 AC 269 ms
80,156 KB
testcase_08 AC 255 ms
80,496 KB
testcase_09 AC 143 ms
79,580 KB
testcase_10 AC 267 ms
79,864 KB
testcase_11 AC 400 ms
81,760 KB
testcase_12 AC 352 ms
80,400 KB
testcase_13 AC 245 ms
78,388 KB
testcase_14 AC 365 ms
79,896 KB
testcase_15 AC 250 ms
80,584 KB
testcase_16 AC 348 ms
80,284 KB
testcase_17 AC 420 ms
79,660 KB
testcase_18 AC 401 ms
80,536 KB
testcase_19 AC 123 ms
77,868 KB
testcase_20 AC 335 ms
80,556 KB
testcase_21 AC 144 ms
79,256 KB
testcase_22 AC 167 ms
80,996 KB
testcase_23 AC 421 ms
80,632 KB
testcase_24 AC 415 ms
81,072 KB
権限があれば一括ダウンロードができます

ソースコード

diff #

N, M = map(int, input().split())

A = [0] * (N + 2)

for i in range(M):
    L, R = map(int, input().split())
    L = N - L
    R = N - R
    A[L] += 1
    A[R + 1] -= 1
for i in range(N):
    if i > 0:
        A[i] = A[i] + A[i - 1]
    print(A[i])
0