結果

問題 No.250 atetubouのzetubou
ユーザー 👑 tatt61880tatt61880
提出日時 2021-04-04 10:42:02
言語 Kuin
(KuinC++ v.2021.9.17)
結果
AC  
実行時間 64 ms / 5,000 ms
コード長 631 bytes
コンパイル時間 2,099 ms
コンパイル使用メモリ 150,528 KB
実行使用メモリ 39,464 KB
最終ジャッジ日時 2023-10-14 18:16:18
合計ジャッジ時間 4,552 ms
ジャッジサーバーID
(参考情報)
judge14 / judge12
このコードへのチャレンジ
(要ログイン)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 56 ms
39,112 KB
testcase_01 AC 48 ms
39,116 KB
testcase_02 AC 62 ms
39,252 KB
testcase_03 AC 64 ms
39,280 KB
testcase_04 AC 61 ms
39,356 KB
testcase_05 AC 62 ms
39,384 KB
testcase_06 AC 59 ms
39,316 KB
testcase_07 AC 53 ms
39,328 KB
testcase_08 AC 61 ms
39,352 KB
testcase_09 AC 58 ms
39,112 KB
testcase_10 AC 62 ms
39,272 KB
testcase_11 AC 56 ms
39,464 KB
testcase_12 AC 61 ms
39,436 KB
testcase_13 AC 54 ms
39,400 KB
testcase_14 AC 47 ms
39,344 KB
testcase_15 AC 62 ms
39,448 KB
testcase_16 AC 61 ms
39,112 KB
testcase_17 AC 61 ms
39,224 KB
testcase_18 AC 61 ms
39,200 KB
testcase_19 AC 62 ms
39,356 KB
testcase_20 AC 47 ms
39,148 KB
testcase_21 AC 47 ms
39,372 KB
権限があれば一括ダウンロードができます

ソースコード

diff #

func main()
	const nMax: int :: 3000
	const valueMax: int :: lib@intMax / 2
	var comb: [][]int :: #[nMax + 1][]int
	do comb[0] :: [1]
	for n(1, nMax)
		do comb[n] :: #[n + 1]int
		do comb[n][0] :: 1
		do comb[n][n] :: 1
		for r(1, n - 1)
			do comb[n][r] :: comb[n - 1][r - 1] + comb[n - 1][r]
			if(comb[n][r] > valueMax)
				do comb[n][r] :: valueMax
			end if
		end for
	end for
	
	var q: int :: cui@inputInt()
	for(1, q)
		var d: int :: cui@inputInt()
		var x: int :: cui@inputInt()
		var t: int :: cui@inputInt()
		var ans: bool :: comb[x + d - 1][d - 1] <= t
		do cui@print((ans ?("AC", "ZETUBOU")) ~ "\n")
	end for
end func
0