結果

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

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 597 ms
136,100 KB
testcase_01 AC 604 ms
136,304 KB
testcase_02 AC 590 ms
136,576 KB
testcase_03 AC 597 ms
136,100 KB
testcase_04 AC 594 ms
136,292 KB
testcase_05 AC 409 ms
113,512 KB
testcase_06 AC 532 ms
128,080 KB
testcase_07 AC 338 ms
105,340 KB
testcase_08 AC 327 ms
103,080 KB
testcase_09 AC 130 ms
82,816 KB
testcase_10 AC 302 ms
102,272 KB
testcase_11 AC 516 ms
128,000 KB
testcase_12 AC 436 ms
117,872 KB
testcase_13 AC 320 ms
103,704 KB
testcase_14 AC 476 ms
123,264 KB
testcase_15 AC 297 ms
101,248 KB
testcase_16 AC 445 ms
119,532 KB
testcase_17 AC 539 ms
128,244 KB
testcase_18 AC 535 ms
129,664 KB
testcase_19 AC 125 ms
79,376 KB
testcase_20 AC 454 ms
117,248 KB
testcase_21 AC 129 ms
81,536 KB
testcase_22 AC 164 ms
87,040 KB
testcase_23 AC 503 ms
125,184 KB
testcase_24 AC 549 ms
130,528 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