結果

問題 No.489 株に挑戦
ユーザー mmmpppmmmppp
提出日時 2017-02-26 23:01:47
言語 Ruby
(3.3.0)
結果
AC  
実行時間 272 ms / 1,000 ms
コード長 187 bytes
コンパイル時間 55 ms
コンパイル使用メモリ 11,572 KB
実行使用メモリ 24,920 KB
最終ジャッジ日時 2023-09-27 05:29:12
合計ジャッジ時間 7,049 ms
ジャッジサーバーID
(参考情報)
judge15 / judge12
このコードへのチャレンジ
(要ログイン)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 188 ms
22,388 KB
testcase_01 AC 163 ms
20,184 KB
testcase_02 AC 76 ms
15,356 KB
testcase_03 AC 73 ms
15,108 KB
testcase_04 AC 70 ms
15,312 KB
testcase_05 AC 72 ms
15,220 KB
testcase_06 AC 69 ms
15,176 KB
testcase_07 AC 72 ms
15,220 KB
testcase_08 AC 71 ms
15,156 KB
testcase_09 AC 72 ms
15,280 KB
testcase_10 AC 73 ms
15,092 KB
testcase_11 AC 72 ms
15,100 KB
testcase_12 AC 72 ms
15,384 KB
testcase_13 AC 71 ms
15,108 KB
testcase_14 AC 71 ms
15,364 KB
testcase_15 AC 77 ms
15,536 KB
testcase_16 AC 258 ms
23,268 KB
testcase_17 AC 86 ms
16,104 KB
testcase_18 AC 162 ms
20,256 KB
testcase_19 AC 145 ms
19,016 KB
testcase_20 AC 247 ms
23,480 KB
testcase_21 AC 110 ms
16,360 KB
testcase_22 AC 87 ms
15,468 KB
testcase_23 AC 150 ms
20,396 KB
testcase_24 AC 270 ms
24,832 KB
testcase_25 AC 73 ms
15,104 KB
testcase_26 AC 188 ms
24,864 KB
testcase_27 AC 136 ms
24,692 KB
testcase_28 AC 73 ms
15,100 KB
testcase_29 AC 72 ms
15,112 KB
testcase_30 AC 272 ms
24,920 KB
testcase_31 AC 154 ms
24,912 KB
testcase_32 AC 175 ms
20,392 KB
testcase_33 AC 269 ms
24,620 KB
testcase_34 AC 233 ms
23,192 KB
testcase_35 AC 133 ms
17,816 KB
testcase_36 AC 98 ms
16,132 KB
testcase_37 AC 168 ms
20,344 KB
権限があれば一括ダウンロードができます
コンパイルメッセージ
Syntax OK

ソースコード

diff #

n,d,K,*x=$<.read.split.map &:to_i
c=h=x[m=0]
n.times{|j|a,f=x[j],[j+d,n-1].min
a>c&&x[f]<=x[h]||(j+1..f).any?{|k|v=x[k]-a;v>m[0]&&m=[v,j,k];v<0}
c,h=a-1,f}
puts m[0]<1?0:[m.shift*K,m*' ']
0