結果

問題 No.2154 あさかつの参加人数
ユーザー kemunikukemuniku
提出日時 2022-12-09 21:29:05
言語 PyPy3
(7.3.15)
結果
AC  
実行時間 371 ms / 2,000 ms
コード長 271 bytes
コンパイル時間 223 ms
コンパイル使用メモリ 82,492 KB
実行使用メモリ 116,852 KB
最終ジャッジ日時 2024-04-22 20:34:02
合計ジャッジ時間 10,730 ms
ジャッジサーバーID
(参考情報)
judge3 / judge1
このコードへのチャレンジ
(要ログイン)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 371 ms
116,584 KB
testcase_01 AC 362 ms
116,660 KB
testcase_02 AC 362 ms
116,852 KB
testcase_03 AC 368 ms
116,720 KB
testcase_04 AC 353 ms
116,692 KB
testcase_05 AC 210 ms
76,412 KB
testcase_06 AC 306 ms
92,892 KB
testcase_07 AC 220 ms
101,048 KB
testcase_08 AC 209 ms
104,524 KB
testcase_09 AC 104 ms
95,956 KB
testcase_10 AC 198 ms
98,312 KB
testcase_11 AC 331 ms
111,840 KB
testcase_12 AC 264 ms
98,392 KB
testcase_13 AC 181 ms
83,972 KB
testcase_14 AC 295 ms
98,492 KB
testcase_15 AC 199 ms
104,216 KB
testcase_16 AC 281 ms
101,280 KB
testcase_17 AC 299 ms
98,320 KB
testcase_18 AC 324 ms
104,648 KB
testcase_19 AC 80 ms
79,624 KB
testcase_20 AC 270 ms
107,696 KB
testcase_21 AC 97 ms
95,480 KB
testcase_22 AC 127 ms
112,284 KB
testcase_23 AC 312 ms
104,420 KB
testcase_24 AC 336 ms
111,708 KB
権限があれば一括ダウンロードができます

ソースコード

diff #

N,M = map(int,input().split())
imos = [0]*(N+2)
for i in range(M):
    L,R = map(int,input().split())
    imos[R] += 1
    imos[L+1] -= 1
now = 0
ans = []
for i in range(N+1):
    now += imos[i]
    ans.append(now)
for k in range(len(ans)-1):
    print(ans[len(ans)-1-k])
0