結果

問題 No.2154 あさかつの参加人数
ユーザー 👑 H20H20
提出日時 2022-12-09 21:40:16
言語 PyPy3
(7.3.15)
結果
AC  
実行時間 504 ms / 2,000 ms
コード長 256 bytes
コンパイル時間 265 ms
コンパイル使用メモリ 82,048 KB
実行使用メモリ 163,884 KB
最終ジャッジ日時 2024-04-22 21:23:01
合計ジャッジ時間 13,153 ms
ジャッジサーバーID
(参考情報)
judge5 / judge3
このコードへのチャレンジ
(要ログイン)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 504 ms
163,884 KB
testcase_01 AC 480 ms
163,436 KB
testcase_02 AC 469 ms
163,632 KB
testcase_03 AC 479 ms
163,820 KB
testcase_04 AC 467 ms
163,828 KB
testcase_05 AC 316 ms
113,792 KB
testcase_06 AC 414 ms
142,112 KB
testcase_07 AC 277 ms
125,312 KB
testcase_08 AC 250 ms
125,428 KB
testcase_09 AC 117 ms
97,664 KB
testcase_10 AC 247 ms
116,992 KB
testcase_11 AC 443 ms
156,760 KB
testcase_12 AC 350 ms
135,680 KB
testcase_13 AC 250 ms
110,464 KB
testcase_14 AC 392 ms
136,928 KB
testcase_15 AC 246 ms
113,920 KB
testcase_16 AC 375 ms
139,520 KB
testcase_17 AC 415 ms
145,920 KB
testcase_18 AC 417 ms
152,064 KB
testcase_19 AC 94 ms
82,236 KB
testcase_20 AC 352 ms
133,288 KB
testcase_21 AC 112 ms
97,112 KB
testcase_22 AC 149 ms
115,500 KB
testcase_23 AC 396 ms
147,456 KB
testcase_24 AC 436 ms
158,848 KB
権限があれば一括ダウンロードができます

ソースコード

diff #

import itertools
N,M = map(int, input().split())
LR = [list(map(int, input().split())) for _ in range(M)]
IMOS = [0]*N
for l,r in LR:
    IMOS[-l]+=1
    if -r+1<0:
        IMOS[-r+1]-=1
ANS = list(itertools.accumulate(IMOS))
for ans in ANS:
    print(ans)
0