結果

問題 No.2154 あさかつの参加人数
ユーザー ch1channnch1channn
提出日時 2022-12-11 23:42:11
言語 PyPy3
(7.3.15)
結果
RE  
実行時間 -
コード長 414 bytes
コンパイル時間 201 ms
コンパイル使用メモリ 82,176 KB
実行使用メモリ 81,536 KB
最終ジャッジ日時 2024-04-23 18:05:18
合計ジャッジ時間 12,311 ms
ジャッジサーバーID
(参考情報)
judge4 / judge5
このコードへのチャレンジ
(要ログイン)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 445 ms
80,640 KB
testcase_01 AC 442 ms
80,512 KB
testcase_02 RE -
testcase_03 RE -
testcase_04 AC 441 ms
80,384 KB
testcase_05 RE -
testcase_06 RE -
testcase_07 AC 256 ms
79,232 KB
testcase_08 AC 243 ms
79,360 KB
testcase_09 AC 120 ms
78,464 KB
testcase_10 AC 238 ms
78,976 KB
testcase_11 RE -
testcase_12 AC 332 ms
79,104 KB
testcase_13 RE -
testcase_14 AC 359 ms
78,464 KB
testcase_15 AC 240 ms
79,360 KB
testcase_16 AC 341 ms
78,976 KB
testcase_17 AC 388 ms
79,104 KB
testcase_18 RE -
testcase_19 AC 103 ms
76,800 KB
testcase_20 RE -
testcase_21 AC 117 ms
78,336 KB
testcase_22 AC 150 ms
80,128 KB
testcase_23 RE -
testcase_24 RE -
権限があれば一括ダウンロードができます

ソースコード

diff #

import sys
if sys.platform =='ios':
	import clipboard
	a=clipboard.get()
	a = a.split('\n')
	text = '\n'.join(a)
	with open('input_file.txt','w') as f:
		f.write(text)
	sys.stdin = open('input_file.txt')
	
n,m = map(int,input().split())
dp = [0]*n
for i in range(m):
	l,r = map(int,input().split())
	dp[l] -= 1
	dp[r-1] += 1
	

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