結果

問題 No.2154 あさかつの参加人数
ユーザー makudo_naldmakudo_nald
提出日時 2022-12-09 21:32:12
言語 PyPy3
(7.3.15)
結果
AC  
実行時間 471 ms / 2,000 ms
コード長 253 bytes
コンパイル時間 342 ms
コンパイル使用メモリ 82,048 KB
実行使用メモリ 101,760 KB
最終ジャッジ日時 2024-04-22 20:52:00
合計ジャッジ時間 13,242 ms
ジャッジサーバーID
(参考情報)
judge2 / judge5
このコードへのチャレンジ
(要ログイン)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 471 ms
101,632 KB
testcase_01 AC 463 ms
101,484 KB
testcase_02 AC 465 ms
101,760 KB
testcase_03 AC 468 ms
101,376 KB
testcase_04 AC 465 ms
101,632 KB
testcase_05 AC 241 ms
76,800 KB
testcase_06 AC 392 ms
87,552 KB
testcase_07 AC 273 ms
92,288 KB
testcase_08 AC 266 ms
94,208 KB
testcase_09 AC 133 ms
87,168 KB
testcase_10 AC 250 ms
89,984 KB
testcase_11 AC 421 ms
98,944 KB
testcase_12 AC 348 ms
91,520 KB
testcase_13 AC 234 ms
82,176 KB
testcase_14 AC 371 ms
90,496 KB
testcase_15 AC 279 ms
93,056 KB
testcase_16 AC 355 ms
93,312 KB
testcase_17 AC 439 ms
89,928 KB
testcase_18 AC 431 ms
94,592 KB
testcase_19 AC 102 ms
78,336 KB
testcase_20 AC 340 ms
94,976 KB
testcase_21 AC 119 ms
85,888 KB
testcase_22 AC 159 ms
94,976 KB
testcase_23 AC 387 ms
94,720 KB
testcase_24 AC 428 ms
98,048 KB
権限があれば一括ダウンロードができます

ソースコード

diff #

N, M = map(int,input().split())

ans = [0] * (N + 1)
for _ in range(M):
    L, R = map(int,input().split())
    L = -L + N
    R = -R + N + 1
    ans[L] += 1
    ans[R] -= 1

for i in range(1, N + 1):
    ans[i] += ans[i - 1]

print(*ans[:-1], sep="\n")
0