結果

問題 No.2154 あさかつの参加人数
ユーザー roarisroaris
提出日時 2022-12-09 23:13:07
言語 PyPy3
(7.3.13)
結果
AC  
実行時間 255 ms / 2,000 ms
コード長 279 bytes
コンパイル時間 396 ms
コンパイル使用メモリ 87,248 KB
実行使用メモリ 82,440 KB
最終ジャッジ日時 2023-08-05 01:03:51
合計ジャッジ時間 9,891 ms
ジャッジサーバーID
(参考情報)
judge11 / judge13
このコードへのチャレンジ(β)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 255 ms
82,440 KB
testcase_01 AC 242 ms
82,152 KB
testcase_02 AC 248 ms
82,328 KB
testcase_03 AC 250 ms
81,916 KB
testcase_04 AC 246 ms
82,156 KB
testcase_05 AC 149 ms
77,292 KB
testcase_06 AC 206 ms
79,300 KB
testcase_07 AC 163 ms
80,300 KB
testcase_08 AC 161 ms
80,548 KB
testcase_09 AC 108 ms
80,268 KB
testcase_10 AC 155 ms
79,908 KB
testcase_11 AC 228 ms
81,008 KB
testcase_12 AC 193 ms
79,700 KB
testcase_13 AC 143 ms
78,248 KB
testcase_14 AC 196 ms
79,828 KB
testcase_15 AC 156 ms
80,384 KB
testcase_16 AC 197 ms
79,876 KB
testcase_17 AC 222 ms
79,716 KB
testcase_18 AC 229 ms
80,504 KB
testcase_19 AC 92 ms
78,284 KB
testcase_20 AC 194 ms
80,772 KB
testcase_21 AC 103 ms
79,388 KB
testcase_22 AC 126 ms
81,240 KB
testcase_23 AC 217 ms
80,212 KB
testcase_24 AC 246 ms
80,912 KB
権限があれば一括ダウンロードができます

ソースコード

diff #

import sys
input = sys.stdin.readline

N, M = map(int, input().split())
imos = [0]*(N+10)

for _ in range(M):
    L, R = map(int, input().split())
    imos[R] += 1
    imos[L+1] -= 1

for i in range(1, N+10):
    imos[i] += imos[i-1]

for i in range(N, 0, -1):
    print(imos[i])
0