結果

問題 No.909 たぴの配置
ユーザー 👑 tatt61880tatt61880
提出日時 2021-02-25 17:19:01
言語 Kuin
(KuinC++ v.2021.9.17)
結果
WA  
実行時間 -
コード長 654 bytes
コンパイル時間 2,468 ms
コンパイル使用メモリ 149,776 KB
実行使用メモリ 6,728 KB
最終ジャッジ日時 2023-10-14 17:26:19
合計ジャッジ時間 10,292 ms
ジャッジサーバーID
(参考情報)
judge12 / judge13
このコードへのチャレンジ
(要ログイン)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 WA -
testcase_01 AC 2 ms
4,348 KB
testcase_02 WA -
testcase_03 AC 2 ms
4,352 KB
testcase_04 AC 2 ms
4,348 KB
testcase_05 WA -
testcase_06 WA -
testcase_07 WA -
testcase_08 WA -
testcase_09 WA -
testcase_10 WA -
testcase_11 WA -
testcase_12 WA -
testcase_13 WA -
testcase_14 AC 301 ms
6,316 KB
testcase_15 WA -
権限があれば一括ダウンロードができます

ソースコード

diff #

func main()
	var n: int :: cui@inputInt()
	var x: []int :: #[n]int
	for i(0, n - 1)
		do x[i] :: cui@inputInt()
	end for
	var y: []int :: #[n]int
	for i(0, n - 1)
		do y[i] :: cui@inputInt()
	end for
	
	var ok: int :: 0
	var ng: int :: 10 ^ 7
	while((ok - ng).abs() > 1)
		var mid: int :: (ok + ng) / 2
		var isOk: bool :: true
		
		for i(0, n - 1)
			if(mid > x[i] + y[i])
				do isOk :: false
				break i
			end if
		end for
		if(isOk)
			do ok :: mid
		else
			do ng :: mid
		end if
	end while
	var ans: int :: ok
	do cui@print("\{ans}\n")
	
	do cui@print("0\n")
	for i(0, n - 1)
		do cui@print("\{x[i]}\n")
	end for
	do cui@print("\{ok}\n")
end func
0