結果

問題 No.2154 あさかつの参加人数
ユーザー ikomaikoma
提出日時 2022-12-09 23:00:19
言語 PyPy3
(7.3.15)
結果
AC  
実行時間 521 ms / 2,000 ms
コード長 195 bytes
コンパイル時間 167 ms
コンパイル使用メモリ 82,336 KB
実行使用メモリ 136,576 KB
最終ジャッジ日時 2024-10-14 22:45:11
合計ジャッジ時間 13,796 ms
ジャッジサーバーID
(参考情報)
judge3 / judge4
このコードへのチャレンジ
(要ログイン)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 521 ms
136,320 KB
testcase_01 AC 513 ms
136,576 KB
testcase_02 AC 504 ms
136,388 KB
testcase_03 AC 519 ms
136,448 KB
testcase_04 AC 498 ms
136,320 KB
testcase_05 AC 347 ms
113,596 KB
testcase_06 AC 449 ms
127,872 KB
testcase_07 AC 287 ms
105,308 KB
testcase_08 AC 257 ms
103,296 KB
testcase_09 AC 121 ms
82,788 KB
testcase_10 AC 266 ms
102,504 KB
testcase_11 AC 438 ms
127,872 KB
testcase_12 AC 375 ms
118,272 KB
testcase_13 AC 270 ms
104,048 KB
testcase_14 AC 426 ms
123,136 KB
testcase_15 AC 276 ms
101,248 KB
testcase_16 AC 401 ms
119,552 KB
testcase_17 AC 446 ms
128,256 KB
testcase_18 AC 487 ms
129,536 KB
testcase_19 AC 109 ms
79,872 KB
testcase_20 AC 382 ms
117,196 KB
testcase_21 AC 118 ms
81,536 KB
testcase_22 AC 148 ms
86,952 KB
testcase_23 AC 453 ms
125,312 KB
testcase_24 AC 488 ms
130,640 KB
権限があれば一括ダウンロードができます

ソースコード

diff #

N,M=map(int,input().split())
LR=[list(map(int,input().split())) for _ in range(M)]

ans = [0]*(N+1)
for l,r in LR:
    ans[N-l]+=1
    ans[N-r+1]-=1

s=0
for a in ans[:-1]:
    s+=a
    print(s)
0