Submission #258925


Source Code Expand

Copy
n = gets.to_i
h = []
n.times do
  h << gets.to_i
end

h.size.times do |i|
  result = 0
  (i - 1).downto(0) do |j|
    if h[i] >= h[j]
      result += 1
    else
      break
    end
  end
  (i + 1).upto(h.size - 1) do |j|
    if h[i] >= h[j]
      result += 1
    else
      break
    end
  end
  puts result
end

Submission Info

Submission Time
Task D - 登山家
User yantene
Language Ruby (1.9.3)
Score 30
Code Size 336 Byte
Status TLE
Exec Time 2033 ms
Memory 5240 KB

Judge Result

Set Name Sample Subtask1 Subtask2
Score / Max Score 0 / 0 30 / 30 0 / 70
Status
AC × 3
AC × 22
AC × 26
TLE × 16
Set Name Test Cases
Sample sample_01.txt, sample_02.txt, sample_03.txt
Subtask1 sample_01.txt, sample_02.txt, sample_03.txt, subtask1_01.txt, subtask1_02.txt, subtask1_03.txt, subtask1_04.txt, subtask1_05.txt, subtask1_06.txt, subtask1_07.txt, subtask1_08.txt, subtask1_09.txt, subtask1_10.txt, subtask1_11.txt, subtask1_12.txt, subtask1_13.txt, subtask1_14.txt, subtask1_15.txt, subtask1_16.txt, subtask1_17.txt, subtask1_18.txt, subtask1_19.txt
Subtask2 sample_01.txt, sample_02.txt, sample_03.txt, subtask1_01.txt, subtask1_02.txt, subtask1_03.txt, subtask1_04.txt, subtask1_05.txt, subtask1_06.txt, subtask1_07.txt, subtask1_08.txt, subtask1_09.txt, subtask1_10.txt, subtask1_11.txt, subtask1_12.txt, subtask1_13.txt, subtask1_14.txt, subtask1_15.txt, subtask1_16.txt, subtask1_17.txt, subtask1_18.txt, subtask1_19.txt, subtask2_01.txt, subtask2_02.txt, subtask2_03.txt, subtask2_04.txt, subtask2_05.txt, subtask2_06.txt, subtask2_07.txt, subtask2_08.txt, subtask2_09.txt, subtask2_10.txt, subtask2_11.txt, subtask2_12.txt, subtask2_13.txt, subtask2_14.txt, subtask2_15.txt, subtask2_16.txt, subtask2_17.txt, subtask2_18.txt, subtask2_19.txt, subtask2_20.txt
Case Name Status Exec Time Memory
sample_01.txt AC 54 ms 4212 KB
sample_02.txt AC 52 ms 4256 KB
sample_03.txt AC 55 ms 4264 KB
subtask1_01.txt AC 54 ms 4212 KB
subtask1_02.txt AC 66 ms 4312 KB
subtask1_03.txt AC 74 ms 4212 KB
subtask1_04.txt AC 62 ms 4208 KB
subtask1_05.txt AC 80 ms 4212 KB
subtask1_06.txt AC 224 ms 4204 KB
subtask1_07.txt AC 100 ms 4212 KB
subtask1_08.txt AC 680 ms 4208 KB
subtask1_09.txt AC 500 ms 4208 KB
subtask1_10.txt AC 74 ms 4256 KB
subtask1_11.txt AC 272 ms 4220 KB
subtask1_12.txt AC 731 ms 4256 KB
subtask1_13.txt AC 65 ms 4212 KB
subtask1_14.txt AC 79 ms 4184 KB
subtask1_15.txt AC 730 ms 4208 KB
subtask1_16.txt AC 69 ms 4316 KB
subtask1_17.txt AC 70 ms 4204 KB
subtask1_18.txt AC 68 ms 4216 KB
subtask1_19.txt AC 728 ms 4212 KB
subtask2_01.txt TLE 2031 ms 4852 KB
subtask2_02.txt TLE 2033 ms 4592 KB
subtask2_03.txt TLE 2033 ms 4848 KB
subtask2_04.txt AC 386 ms 4704 KB
subtask2_05.txt TLE 2030 ms 5236 KB
subtask2_06.txt TLE 2033 ms 5236 KB
subtask2_07.txt TLE 2033 ms 5240 KB
subtask2_08.txt TLE 2033 ms 5232 KB
subtask2_09.txt TLE 2032 ms 5240 KB
subtask2_10.txt TLE 2032 ms 5232 KB
subtask2_11.txt AC 671 ms 5108 KB
subtask2_12.txt TLE 2033 ms 5236 KB
subtask2_13.txt TLE 2033 ms 5148 KB
subtask2_14.txt TLE 2032 ms 5232 KB
subtask2_15.txt AC 650 ms 5104 KB
subtask2_16.txt TLE 2031 ms 5232 KB
subtask2_17.txt TLE 2033 ms 5240 KB
subtask2_18.txt TLE 2033 ms 5232 KB
subtask2_19.txt AC 653 ms 5104 KB
subtask2_20.txt TLE 2030 ms 5232 KB