結果

問題 No.2154 あさかつの参加人数
ユーザー hiragnhiragn
提出日時 2022-12-14 20:25:35
言語 Python3
(3.12.2 + numpy 1.26.4 + scipy 1.12.0)
結果
AC  
実行時間 1,825 ms / 2,000 ms
コード長 342 bytes
コンパイル時間 388 ms
コンパイル使用メモリ 12,800 KB
実行使用メモリ 46,368 KB
最終ジャッジ日時 2024-04-25 23:52:23
合計ジャッジ時間 37,362 ms
ジャッジサーバーID
(参考情報)
judge1 / judge2
このコードへのチャレンジ
(要ログイン)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 1,817 ms
46,204 KB
testcase_01 AC 1,797 ms
46,192 KB
testcase_02 AC 1,800 ms
46,208 KB
testcase_03 AC 1,787 ms
46,368 KB
testcase_04 AC 1,825 ms
46,252 KB
testcase_05 AC 1,069 ms
11,136 KB
testcase_06 AC 1,513 ms
25,956 KB
testcase_07 AC 892 ms
33,524 KB
testcase_08 AC 856 ms
36,896 KB
testcase_09 AC 235 ms
29,228 KB
testcase_10 AC 808 ms
31,168 KB
testcase_11 AC 1,641 ms
42,236 KB
testcase_12 AC 1,238 ms
31,436 KB
testcase_13 AC 811 ms
18,684 KB
testcase_14 AC 1,395 ms
30,288 KB
testcase_15 AC 778 ms
35,508 KB
testcase_16 AC 1,285 ms
34,356 KB
testcase_17 AC 1,513 ms
30,148 KB
testcase_18 AC 1,551 ms
36,512 KB
testcase_19 AC 120 ms
14,544 KB
testcase_20 AC 1,212 ms
37,780 KB
testcase_21 AC 207 ms
27,336 KB
testcase_22 AC 384 ms
43,468 KB
testcase_23 AC 1,443 ms
37,172 KB
testcase_24 AC 1,617 ms
41,804 KB
権限があれば一括ダウンロードができます

ソースコード

diff #

from itertools import accumulate


def main():
    n, m = map(int, input().split())

    lst = [0] * (n + 1)
    for _ in range(m):
        left, right = map(int, input().split())
        lst[n - left] += 1
        lst[n - right + 1] -= 1

    acc = list(accumulate(lst))
    print(*acc[:-1], sep="\n")


if __name__ == "__main__":
    main()
0