結果

問題 No.2154 あさかつの参加人数
ユーザー ikomaikoma
提出日時 2022-12-09 23:00:19
言語 PyPy3
(7.3.13)
結果
AC  
実行時間 549 ms / 2,000 ms
コード長 195 bytes
コンパイル時間 321 ms
コンパイル使用メモリ 86,960 KB
実行使用メモリ 138,232 KB
最終ジャッジ日時 2023-08-05 00:54:32
合計ジャッジ時間 15,337 ms
ジャッジサーバーID
(参考情報)
judge12 / judge13
このコードへのチャレンジ(β)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 549 ms
137,796 KB
testcase_01 AC 544 ms
138,052 KB
testcase_02 AC 546 ms
138,052 KB
testcase_03 AC 540 ms
138,232 KB
testcase_04 AC 544 ms
138,048 KB
testcase_05 AC 385 ms
115,200 KB
testcase_06 AC 485 ms
129,872 KB
testcase_07 AC 317 ms
106,540 KB
testcase_08 AC 301 ms
104,312 KB
testcase_09 AC 148 ms
84,764 KB
testcase_10 AC 301 ms
104,036 KB
testcase_11 AC 483 ms
129,312 KB
testcase_12 AC 417 ms
119,424 KB
testcase_13 AC 308 ms
105,340 KB
testcase_14 AC 455 ms
125,068 KB
testcase_15 AC 289 ms
103,172 KB
testcase_16 AC 424 ms
120,924 KB
testcase_17 AC 493 ms
129,824 KB
testcase_18 AC 497 ms
130,864 KB
testcase_19 AC 132 ms
80,676 KB
testcase_20 AC 413 ms
118,996 KB
testcase_21 AC 140 ms
82,844 KB
testcase_22 AC 170 ms
88,264 KB
testcase_23 AC 471 ms
126,464 KB
testcase_24 AC 506 ms
132,024 KB
権限があれば一括ダウンロードができます

ソースコード

diff #

N,M=map(int,input().split())
LR=[list(map(int,input().split())) for _ in range(M)]

ans = [0]*(N+1)
for l,r in LR:
    ans[N-l]+=1
    ans[N-r+1]-=1

s=0
for a in ans[:-1]:
    s+=a
    print(s)
0