結果

問題 No.2154 あさかつの参加人数
ユーザー 👑 tatt61880tatt61880
提出日時 2023-03-13 22:00:43
言語 Kuin
(KuinC++ v.2021.9.17)
結果
AC  
実行時間 801 ms / 2,000 ms
コード長 337 bytes
コンパイル時間 2,173 ms
コンパイル使用メモリ 146,228 KB
実行使用メモリ 7,644 KB
最終ジャッジ日時 2023-10-18 11:22:27
合計ジャッジ時間 20,098 ms
ジャッジサーバーID
(参考情報)
judge15 / judge13
このコードへのチャレンジ
(要ログイン)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 799 ms
7,644 KB
testcase_01 AC 800 ms
7,644 KB
testcase_02 AC 799 ms
7,644 KB
testcase_03 AC 800 ms
7,644 KB
testcase_04 AC 801 ms
7,644 KB
testcase_05 AC 267 ms
4,348 KB
testcase_06 AC 560 ms
5,336 KB
testcase_07 AC 421 ms
6,392 KB
testcase_08 AC 431 ms
6,656 KB
testcase_09 AC 192 ms
5,864 KB
testcase_10 AC 379 ms
6,128 KB
testcase_11 AC 696 ms
7,184 KB
testcase_12 AC 518 ms
6,128 KB
testcase_13 AC 280 ms
4,544 KB
testcase_14 AC 556 ms
5,864 KB
testcase_15 AC 408 ms
6,656 KB
testcase_16 AC 557 ms
6,392 KB
testcase_17 AC 593 ms
5,864 KB
testcase_18 AC 664 ms
6,656 KB
testcase_19 AC 55 ms
4,348 KB
testcase_20 AC 564 ms
6,920 KB
testcase_21 AC 169 ms
5,600 KB
testcase_22 AC 334 ms
7,448 KB
testcase_23 AC 629 ms
6,656 KB
testcase_24 AC 712 ms
7,184 KB
権限があれば一括ダウンロードができます

ソースコード

diff #

func main()
	var n: int :: cui@inputInt()
	var m: int :: cui@inputInt()
	var diff: []int :: #[n + 1]int
	for(1, m)
		var l: int :: cui@inputInt()
		var r: int :: cui@inputInt()
		do diff[n - l] :+ 1
		do diff[n - r + 1] :- 1
	end for
	
	var ans: int :: 0
	for i(0, n - 1)
		do ans :+ diff[i]
		do cui@print("\{ans}\n")
	end for
end func
0