結果

問題 No.2154 あさかつの参加人数
ユーザー tassei903tassei903
提出日時 2022-12-09 21:28:36
言語 PyPy3
(7.3.15)
結果
AC  
実行時間 490 ms / 2,000 ms
コード長 539 bytes
コンパイル時間 207 ms
コンパイル使用メモリ 82,304 KB
実行使用メモリ 138,040 KB
最終ジャッジ日時 2024-04-22 20:32:35
合計ジャッジ時間 12,385 ms
ジャッジサーバーID
(参考情報)
judge5 / judge3
このコードへのチャレンジ
(要ログイン)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 490 ms
137,832 KB
testcase_01 AC 457 ms
137,900 KB
testcase_02 AC 436 ms
137,956 KB
testcase_03 AC 479 ms
137,912 KB
testcase_04 AC 439 ms
138,040 KB
testcase_05 AC 217 ms
76,336 KB
testcase_06 AC 377 ms
102,656 KB
testcase_07 AC 243 ms
114,624 KB
testcase_08 AC 242 ms
119,184 KB
testcase_09 AC 117 ms
104,788 KB
testcase_10 AC 225 ms
110,720 KB
testcase_11 AC 395 ms
130,816 KB
testcase_12 AC 344 ms
110,976 KB
testcase_13 AC 225 ms
89,088 KB
testcase_14 AC 331 ms
110,196 KB
testcase_15 AC 233 ms
118,372 KB
testcase_16 AC 322 ms
106,800 KB
testcase_17 AC 360 ms
110,108 KB
testcase_18 AC 397 ms
120,372 KB
testcase_19 AC 82 ms
81,624 KB
testcase_20 AC 311 ms
123,392 KB
testcase_21 AC 108 ms
103,296 KB
testcase_22 AC 155 ms
127,572 KB
testcase_23 AC 353 ms
120,612 KB
testcase_24 AC 408 ms
118,668 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