結果

問題 No.2154 あさかつの参加人数
ユーザー tassei903tassei903
提出日時 2022-12-09 21:28:36
言語 PyPy3
(7.3.15)
結果
AC  
実行時間 551 ms / 2,000 ms
コード長 539 bytes
コンパイル時間 697 ms
コンパイル使用メモリ 87,064 KB
実行使用メモリ 139,108 KB
最終ジャッジ日時 2023-08-04 22:15:53
合計ジャッジ時間 14,620 ms
ジャッジサーバーID
(参考情報)
judge13 / judge14
このコードへのチャレンジ(β)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 527 ms
139,108 KB
testcase_01 AC 540 ms
139,028 KB
testcase_02 AC 535 ms
138,768 KB
testcase_03 AC 551 ms
138,980 KB
testcase_04 AC 540 ms
139,020 KB
testcase_05 AC 265 ms
77,820 KB
testcase_06 AC 463 ms
104,004 KB
testcase_07 AC 317 ms
115,556 KB
testcase_08 AC 317 ms
113,800 KB
testcase_09 AC 162 ms
105,768 KB
testcase_10 AC 298 ms
111,224 KB
testcase_11 AC 483 ms
132,084 KB
testcase_12 AC 401 ms
112,200 KB
testcase_13 AC 287 ms
90,192 KB
testcase_14 AC 420 ms
111,348 KB
testcase_15 AC 297 ms
119,292 KB
testcase_16 AC 410 ms
108,444 KB
testcase_17 AC 488 ms
111,072 KB
testcase_18 AC 506 ms
121,356 KB
testcase_19 AC 127 ms
82,536 KB
testcase_20 AC 391 ms
124,816 KB
testcase_21 AC 153 ms
104,376 KB
testcase_22 AC 201 ms
128,632 KB
testcase_23 AC 461 ms
121,596 KB
testcase_24 AC 488 ms
121,152 KB
権限があれば一括ダウンロードができます

ソースコード

diff #

import sys
#input = lambda :sys.stdin.readline()[:-1]
ni = lambda :int(input())
na = lambda :list(map(int,input().split()))
yes = lambda :print("yes");Yes = lambda :print("Yes");YES = lambda : print("YES")
no = lambda :print("no");No = lambda :print("No");NO = lambda : print("NO")
#######################################################################
n,m = na()
f = [0] * (n+1)
for i in range(m):
    r,l = na()
    f[l-1] += 1
    f[r] -= 1

ans = 0
z = []
for i in range(n):
    ans += f[i]
    z.append(ans)
print(*z[::-1],sep="\n")
0