Submission #7249982


Source Code Expand

Copy
n = read_line.to_i
h = read_line.split.map(&.to_i)
ans = 0
prev = 0
(n - 1).times do |i|
  if h[i + 1] <= h[i]
    prev += 1
    ans = {ans, prev}.max
  else
    prev = 0
  end
end
puts ans

Submission Info

Submission Time
Task C - Lower
User tomerun
Language Crystal (0.20.5)
Score 300
Code Size 203 Byte
Status AC
Exec Time 60 ms
Memory 9596 KB

Judge Result

Set Name All Sample
Score / Max Score 300 / 300 0 / 0
Status
AC × 18
AC × 3
Set Name Test Cases
All sample_01, sample_02, sample_03, testcase_01, testcase_02, testcase_03, testcase_04, testcase_05, testcase_06, testcase_07, testcase_08, testcase_09, testcase_10, testcase_11, testcase_12, testcase_13, testcase_14, testcase_15
Sample sample_01, sample_02, sample_03
Case Name Status Exec Time Memory
sample_01 AC 1 ms 636 KB
sample_02 AC 1 ms 636 KB
sample_03 AC 2 ms 636 KB
testcase_01 AC 35 ms 4732 KB
testcase_02 AC 57 ms 7292 KB
testcase_03 AC 54 ms 6012 KB
testcase_04 AC 3 ms 764 KB
testcase_05 AC 7 ms 1276 KB
testcase_06 AC 34 ms 4732 KB
testcase_07 AC 49 ms 7676 KB
testcase_08 AC 58 ms 8060 KB
testcase_09 AC 3 ms 764 KB
testcase_10 AC 58 ms 7420 KB
testcase_11 AC 60 ms 9596 KB
testcase_12 AC 30 ms 5244 KB
testcase_13 AC 1 ms 636 KB
testcase_14 AC 42 ms 7420 KB
testcase_15 AC 43 ms 8572 KB