結果

問題 No.2154 あさかつの参加人数
ユーザー WoqpDFWoqpDF
提出日時 2022-12-09 21:47:58
言語 PyPy3
(7.3.15)
結果
AC  
実行時間 1,417 ms / 2,000 ms
コード長 386 bytes
コンパイル時間 455 ms
コンパイル使用メモリ 82,304 KB
実行使用メモリ 221,136 KB
最終ジャッジ日時 2024-04-22 21:40:42
合計ジャッジ時間 28,261 ms
ジャッジサーバーID
(参考情報)
judge2 / judge4
このコードへのチャレンジ
(要ログイン)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 1,417 ms
220,396 KB
testcase_01 AC 1,380 ms
221,136 KB
testcase_02 AC 1,388 ms
220,444 KB
testcase_03 AC 1,368 ms
220,384 KB
testcase_04 AC 1,380 ms
220,420 KB
testcase_05 AC 360 ms
78,180 KB
testcase_06 AC 999 ms
138,328 KB
testcase_07 AC 705 ms
142,252 KB
testcase_08 AC 669 ms
149,956 KB
testcase_09 AC 271 ms
123,580 KB
testcase_10 AC 632 ms
134,448 KB
testcase_11 AC 1,186 ms
198,912 KB
testcase_12 AC 904 ms
147,156 KB
testcase_13 AC 538 ms
104,272 KB
testcase_14 AC 1,008 ms
151,112 KB
testcase_15 AC 643 ms
148,076 KB
testcase_16 AC 952 ms
154,072 KB
testcase_17 AC 1,058 ms
152,304 KB
testcase_18 AC 1,170 ms
177,336 KB
testcase_19 AC 162 ms
90,240 KB
testcase_20 AC 943 ms
180,336 KB
testcase_21 AC 257 ms
115,572 KB
testcase_22 AC 415 ms
149,788 KB
testcase_23 AC 1,098 ms
172,428 KB
testcase_24 AC 1,257 ms
201,024 KB
権限があれば一括ダウンロードができます

ソースコード

diff #

n,m =map(int,input().split())
import collections
llist = collections.defaultdict(int)
rlist = collections.defaultdict(int)
for i in range(m):
    l,r =map(int,input().split())
    llist[l] += 1
    rlist[r] += 1

for i in reversed(range(1,n+1)):
    if i == n:
        temp = llist[i]
        print(temp)
    else:
        temp += llist[i]
        temp -= rlist[i+1]
        print(temp)
0