結果

問題 No.703 ゴミ拾い Easy
ユーザー らっしー(raccy)らっしー(raccy)
提出日時 2018-10-06 12:11:57
言語 Ruby
(3.3.0)
結果
TLE  
実行時間 -
コード長 228 bytes
コンパイル時間 82 ms
コンパイル使用メモリ 7,552 KB
実行使用メモリ 94,576 KB
最終ジャッジ日時 2024-04-20 17:49:21
合計ジャッジ時間 7,543 ms
ジャッジサーバーID
(参考情報)
judge1 / judge2
このコードへのチャレンジ
(要ログイン)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 79 ms
17,536 KB
testcase_01 AC 86 ms
12,032 KB
testcase_02 AC 86 ms
12,032 KB
testcase_03 AC 79 ms
12,288 KB
testcase_04 AC 78 ms
12,160 KB
testcase_05 AC 79 ms
12,160 KB
testcase_06 AC 82 ms
12,032 KB
testcase_07 AC 79 ms
12,160 KB
testcase_08 AC 76 ms
12,288 KB
testcase_09 AC 81 ms
12,032 KB
testcase_10 AC 79 ms
12,160 KB
testcase_11 AC 81 ms
12,160 KB
testcase_12 AC 80 ms
12,288 KB
testcase_13 AC 81 ms
12,032 KB
testcase_14 AC 190 ms
16,128 KB
testcase_15 AC 190 ms
16,384 KB
testcase_16 AC 188 ms
16,384 KB
testcase_17 AC 195 ms
16,000 KB
testcase_18 AC 196 ms
16,128 KB
testcase_19 AC 186 ms
16,384 KB
testcase_20 AC 199 ms
16,256 KB
testcase_21 AC 187 ms
16,256 KB
testcase_22 AC 195 ms
16,128 KB
testcase_23 AC 198 ms
16,256 KB
testcase_24 TLE -
testcase_25 -- -
testcase_26 -- -
testcase_27 -- -
testcase_28 -- -
testcase_29 -- -
testcase_30 -- -
testcase_31 -- -
testcase_32 -- -
testcase_33 -- -
testcase_34 -- -
testcase_35 -- -
testcase_36 -- -
testcase_37 -- -
testcase_38 -- -
testcase_39 -- -
testcase_40 -- -
testcase_41 -- -
testcase_42 -- -
testcase_43 -- -
testcase_44 -- -
testcase_45 -- -
testcase_46 -- -
testcase_47 -- -
testcase_48 -- -
testcase_49 -- -
権限があれば一括ダウンロードができます
コンパイルメッセージ
Syntax OK

ソースコード

diff #

n = gets.to_i
a = gets.split.map(&:to_i)
x = gets.split.map(&:to_i)
y = gets.split.map(&:to_i)
list = [0]
(0...n).each do |i|
  list[i + 1] = (0..i).map do |j|
    list[j] + (a[i] - x[j])**2 + y[j]**2
  end.min
end
puts list[n]
0