結果

問題 No.2154 あさかつの参加人数
ユーザー miya145592miya145592
提出日時 2023-05-04 05:52:08
言語 PyPy3
(7.3.15)
結果
AC  
実行時間 534 ms / 2,000 ms
コード長 284 bytes
コンパイル時間 291 ms
コンパイル使用メモリ 82,432 KB
実行使用メモリ 169,216 KB
最終ジャッジ日時 2024-05-01 19:40:05
合計ジャッジ時間 16,291 ms
ジャッジサーバーID
(参考情報)
judge1 / judge3
このコードへのチャレンジ
(要ログイン)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 534 ms
168,996 KB
testcase_01 AC 532 ms
169,012 KB
testcase_02 AC 519 ms
169,088 KB
testcase_03 AC 519 ms
168,876 KB
testcase_04 AC 516 ms
169,216 KB
testcase_05 AC 344 ms
113,920 KB
testcase_06 AC 457 ms
140,160 KB
testcase_07 AC 299 ms
125,588 KB
testcase_08 AC 281 ms
125,952 KB
testcase_09 AC 128 ms
98,432 KB
testcase_10 AC 278 ms
119,808 KB
testcase_11 AC 460 ms
157,184 KB
testcase_12 AC 387 ms
135,948 KB
testcase_13 AC 282 ms
110,464 KB
testcase_14 AC 422 ms
140,544 KB
testcase_15 AC 263 ms
124,032 KB
testcase_16 AC 394 ms
139,596 KB
testcase_17 AC 456 ms
144,128 KB
testcase_18 AC 468 ms
152,416 KB
testcase_19 AC 105 ms
82,016 KB
testcase_20 AC 387 ms
139,776 KB
testcase_21 AC 121 ms
95,312 KB
testcase_22 AC 160 ms
116,060 KB
testcase_23 AC 444 ms
147,712 KB
testcase_24 AC 503 ms
159,616 KB
権限があれば一括ダウンロードができます

ソースコード

diff #

N, M = map(int, input().split())
LR = [list(map(int, input().split())) for _ in range(M)]
C = [0 for _ in range(N+1)]
for l, r in LR:
    C[N-l+1]+=1
    if N-r+2<=N:
        C[N-r+2]-=1
S = [0]
for i in range(1, N+1):
    S.append(S[-1]+C[i])
for i in range(1, N+1):
    print(S[i])
0