Submission #905392


Source Code Expand

io = STDIN
n=io.gets.chomp.to_i
a=io.gets.chomp.split.map(&:to_i)
sum=0
(1..n).each do |k|
  a.each_cons(k) do |x|
    sum+=x.min
  end
end
puts sum

Submission Info

Submission Time
Task B - Minimum Sum
User andor
Language Ruby (2.3.3)
Score 0
Code Size 157 Byte
Status TLE
Exec Time 2104 ms
Memory 23940 KB

Judge Result

Set Name Sample All
Score / Max Score 0 / 0 0 / 400
Status
AC × 3
AC × 7
TLE × 6
Set Name Test Cases
Sample example0, example1, example2
All corner0, corner1, corner2, corner3, example0, example1, example2, maxrand0, maxrand1, maxrand2, rand0, rand1, rand2
Case Name Status Exec Time Memory
corner0 TLE 2104 ms 23940 KB
corner1 TLE 2104 ms 23812 KB
corner2 AC 10 ms 1788 KB
corner3 TLE 2104 ms 23812 KB
example0 AC 10 ms 1788 KB
example1 AC 10 ms 1788 KB
example2 AC 10 ms 1788 KB
maxrand0 TLE 2104 ms 23812 KB
maxrand1 TLE 2104 ms 23812 KB
maxrand2 TLE 2104 ms 23812 KB
rand0 AC 246 ms 4732 KB
rand1 AC 10 ms 1788 KB
rand2 AC 17 ms 2172 KB