結果

問題 No.2154 あさかつの参加人数
ユーザー tamlog06tamlog06
提出日時 2022-12-09 21:33:08
言語 PyPy3
(7.3.15)
結果
AC  
実行時間 891 ms / 2,000 ms
コード長 268 bytes
コンパイル時間 199 ms
コンパイル使用メモリ 82,356 KB
実行使用メモリ 220,860 KB
最終ジャッジ日時 2024-04-22 20:58:33
合計ジャッジ時間 19,058 ms
ジャッジサーバーID
(参考情報)
judge3 / judge1
このコードへのチャレンジ
(要ログイン)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 885 ms
220,500 KB
testcase_01 AC 891 ms
220,496 KB
testcase_02 AC 884 ms
220,396 KB
testcase_03 AC 868 ms
220,264 KB
testcase_04 AC 868 ms
220,860 KB
testcase_05 AC 257 ms
78,192 KB
testcase_06 AC 653 ms
137,928 KB
testcase_07 AC 450 ms
138,584 KB
testcase_08 AC 444 ms
151,328 KB
testcase_09 AC 188 ms
118,508 KB
testcase_10 AC 402 ms
135,468 KB
testcase_11 AC 767 ms
200,188 KB
testcase_12 AC 589 ms
147,040 KB
testcase_13 AC 346 ms
104,280 KB
testcase_14 AC 639 ms
147,384 KB
testcase_15 AC 428 ms
152,812 KB
testcase_16 AC 613 ms
154,060 KB
testcase_17 AC 715 ms
152,300 KB
testcase_18 AC 740 ms
177,500 KB
testcase_19 AC 118 ms
90,704 KB
testcase_20 AC 599 ms
180,440 KB
testcase_21 AC 178 ms
119,136 KB
testcase_22 AC 269 ms
150,444 KB
testcase_23 AC 721 ms
172,200 KB
testcase_24 AC 849 ms
204,760 KB
権限があれば一括ダウンロードができます

ソースコード

diff #

N, M = map(int, input().split())
from collections import defaultdict
L, R = defaultdict(int), defaultdict(int)

for i in range(M):
    l, r = map(int, input().split())
    L[l] += 1
    R[r-1] += 1

n = 0
for i in range(N, 0, -1):
    n = n + L[i] - R[i]
    print(n)
0