結果

問題 No.909 たぴの配置
ユーザー maimai
提出日時 2019-10-18 21:34:39
言語 Ruby
(3.3.0)
結果
AC  
実行時間 430 ms / 3,000 ms
コード長 167 bytes
コンパイル時間 351 ms
コンパイル使用メモリ 11,236 KB
実行使用メモリ 45,712 KB
最終ジャッジ日時 2023-09-07 21:31:43
合計ジャッジ時間 7,715 ms
ジャッジサーバーID
(参考情報)
judge11 / judge13
このコードへのチャレンジ(β)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 78 ms
15,144 KB
testcase_01 AC 72 ms
15,384 KB
testcase_02 AC 73 ms
15,272 KB
testcase_03 AC 72 ms
15,108 KB
testcase_04 AC 75 ms
15,312 KB
testcase_05 AC 388 ms
44,940 KB
testcase_06 AC 400 ms
45,536 KB
testcase_07 AC 361 ms
44,732 KB
testcase_08 AC 395 ms
44,828 KB
testcase_09 AC 415 ms
45,712 KB
testcase_10 AC 395 ms
44,596 KB
testcase_11 AC 394 ms
44,468 KB
testcase_12 AC 415 ms
44,944 KB
testcase_13 AC 430 ms
45,484 KB
testcase_14 AC 391 ms
44,740 KB
testcase_15 AC 377 ms
44,460 KB
権限があれば一括ダウンロードができます
コンパイルメッセージ
Main.rb:3: warning: assigned but unused variable - n
Syntax OK

ソースコード

diff #

def lscan; gets.split.map(&:to_i); end

n = gets.to_i
xy = [lscan,lscan].transpose

mx = xy.map{|x,y| x+y}.min

p mx
p 0
puts xy.map{|x,y| [0, [mx-y, x].min].max}
p mx
0