結果

問題 No.2154 あさかつの参加人数
ユーザー machoniumpmachoniump
提出日時 2022-12-09 22:13:12
言語 Python3
(3.12.2 + numpy 1.26.4 + scipy 1.12.0)
結果
AC  
実行時間 1,887 ms / 2,000 ms
コード長 250 bytes
コンパイル時間 113 ms
コンパイル使用メモリ 10,620 KB
実行使用メモリ 28,192 KB
最終ジャッジ日時 2023-08-04 23:58:25
合計ジャッジ時間 38,072 ms
ジャッジサーバーID
(参考情報)
judge14 / judge12
このコードへのチャレンジ(β)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 1,860 ms
27,948 KB
testcase_01 AC 1,853 ms
27,920 KB
testcase_02 AC 1,850 ms
27,964 KB
testcase_03 AC 1,887 ms
28,192 KB
testcase_04 AC 1,857 ms
27,912 KB
testcase_05 AC 1,125 ms
12,444 KB
testcase_06 AC 1,560 ms
18,928 KB
testcase_07 AC 992 ms
22,436 KB
testcase_08 AC 927 ms
24,012 KB
testcase_09 AC 357 ms
20,588 KB
testcase_10 AC 883 ms
21,352 KB
testcase_11 AC 1,648 ms
26,256 KB
testcase_12 AC 1,334 ms
21,332 KB
testcase_13 AC 871 ms
15,900 KB
testcase_14 AC 1,457 ms
20,948 KB
testcase_15 AC 886 ms
23,436 KB
testcase_16 AC 1,364 ms
22,936 KB
testcase_17 AC 1,617 ms
20,796 KB
testcase_18 AC 1,670 ms
23,692 KB
testcase_19 AC 222 ms
13,992 KB
testcase_20 AC 1,355 ms
24,220 KB
testcase_21 AC 322 ms
19,784 KB
testcase_22 AC 515 ms
26,868 KB
testcase_23 AC 1,542 ms
24,076 KB
testcase_24 AC 1,724 ms
26,072 KB
権限があれば一括ダウンロードができます

ソースコード

diff #

n, m = map(int, input().split())
imos = [0]*550000
for i in range(m):
    r, l = map(int, input().split())
    l -= 1
    imos[l] += 1
    imos[r] -= 1

for i in range(549999):
    imos[i+1] += imos[i]
for i in range(n-1, -1, -1):
    print(imos[i])
0