結果

問題 No.2154 あさかつの参加人数
ユーザー roarisroaris
提出日時 2022-12-09 23:13:07
言語 PyPy3
(7.3.15)
結果
AC  
実行時間 225 ms / 2,000 ms
コード長 279 bytes
コンパイル時間 377 ms
コンパイル使用メモリ 82,260 KB
実行使用メモリ 80,320 KB
最終ジャッジ日時 2024-04-22 23:01:08
合計ジャッジ時間 7,827 ms
ジャッジサーバーID
(参考情報)
judge5 / judge3
このコードへのチャレンジ
(要ログイン)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 207 ms
80,112 KB
testcase_01 AC 225 ms
80,028 KB
testcase_02 AC 219 ms
80,040 KB
testcase_03 AC 210 ms
80,320 KB
testcase_04 AC 225 ms
80,188 KB
testcase_05 AC 113 ms
76,164 KB
testcase_06 AC 167 ms
77,760 KB
testcase_07 AC 135 ms
78,980 KB
testcase_08 AC 142 ms
78,836 KB
testcase_09 AC 74 ms
78,388 KB
testcase_10 AC 123 ms
78,796 KB
testcase_11 AC 191 ms
79,744 KB
testcase_12 AC 154 ms
78,432 KB
testcase_13 AC 111 ms
77,132 KB
testcase_14 AC 171 ms
78,284 KB
testcase_15 AC 128 ms
79,156 KB
testcase_16 AC 173 ms
79,020 KB
testcase_17 AC 176 ms
78,324 KB
testcase_18 AC 189 ms
79,464 KB
testcase_19 AC 62 ms
76,428 KB
testcase_20 AC 169 ms
79,180 KB
testcase_21 AC 74 ms
77,732 KB
testcase_22 AC 96 ms
80,100 KB
testcase_23 AC 174 ms
79,044 KB
testcase_24 AC 188 ms
79,736 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