結果

問題 No.2154 あさかつの参加人数
ユーザー tamlog06tamlog06
提出日時 2022-12-09 21:33:08
言語 PyPy3
(7.3.13)
結果
AC  
実行時間 941 ms / 2,000 ms
コード長 268 bytes
コンパイル時間 443 ms
コンパイル使用メモリ 86,948 KB
実行使用メモリ 220,900 KB
最終ジャッジ日時 2023-08-04 22:39:58
合計ジャッジ時間 21,206 ms
ジャッジサーバーID
(参考情報)
judge11 / judge12
このコードへのチャレンジ(β)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 941 ms
220,104 KB
testcase_01 AC 939 ms
220,724 KB
testcase_02 AC 931 ms
220,528 KB
testcase_03 AC 921 ms
220,900 KB
testcase_04 AC 929 ms
220,204 KB
testcase_05 AC 322 ms
79,740 KB
testcase_06 AC 692 ms
142,544 KB
testcase_07 AC 491 ms
141,840 KB
testcase_08 AC 499 ms
153,828 KB
testcase_09 AC 238 ms
125,208 KB
testcase_10 AC 467 ms
134,236 KB
testcase_11 AC 826 ms
204,720 KB
testcase_12 AC 644 ms
149,604 KB
testcase_13 AC 409 ms
107,024 KB
testcase_14 AC 677 ms
151,916 KB
testcase_15 AC 486 ms
146,016 KB
testcase_16 AC 675 ms
155,904 KB
testcase_17 AC 739 ms
156,592 KB
testcase_18 AC 806 ms
181,092 KB
testcase_19 AC 166 ms
87,852 KB
testcase_20 AC 652 ms
179,460 KB
testcase_21 AC 232 ms
127,312 KB
testcase_22 AC 318 ms
144,668 KB
testcase_23 AC 756 ms
175,312 KB
testcase_24 AC 853 ms
206,140 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