結果

問題 No.489 株に挑戦
ユーザー mmmpppmmmppp
提出日時 2017-02-25 23:16:26
言語 Ruby
(3.3.0)
結果
AC  
実行時間 217 ms / 1,000 ms
コード長 205 bytes
コンパイル時間 73 ms
コンパイル使用メモリ 11,560 KB
実行使用メモリ 28,416 KB
最終ジャッジ日時 2023-09-27 05:22:53
合計ジャッジ時間 5,889 ms
ジャッジサーバーID
(参考情報)
judge13 / judge15
このコードへのチャレンジ
(要ログイン)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 179 ms
22,844 KB
testcase_01 AC 121 ms
21,992 KB
testcase_02 AC 69 ms
15,228 KB
testcase_03 AC 74 ms
15,272 KB
testcase_04 AC 73 ms
15,152 KB
testcase_05 AC 71 ms
15,228 KB
testcase_06 AC 71 ms
15,280 KB
testcase_07 AC 73 ms
15,160 KB
testcase_08 AC 70 ms
15,008 KB
testcase_09 AC 71 ms
15,280 KB
testcase_10 AC 69 ms
15,092 KB
testcase_11 AC 69 ms
15,232 KB
testcase_12 AC 72 ms
15,140 KB
testcase_13 AC 71 ms
15,164 KB
testcase_14 AC 75 ms
15,156 KB
testcase_15 AC 76 ms
15,544 KB
testcase_16 AC 217 ms
26,984 KB
testcase_17 AC 83 ms
16,116 KB
testcase_18 AC 151 ms
21,452 KB
testcase_19 AC 120 ms
20,644 KB
testcase_20 AC 184 ms
25,120 KB
testcase_21 AC 91 ms
16,612 KB
testcase_22 AC 83 ms
15,744 KB
testcase_23 AC 141 ms
21,232 KB
testcase_24 AC 214 ms
28,120 KB
testcase_25 AC 70 ms
15,092 KB
testcase_26 AC 173 ms
24,784 KB
testcase_27 AC 122 ms
22,380 KB
testcase_28 AC 69 ms
15,256 KB
testcase_29 AC 71 ms
15,276 KB
testcase_30 AC 133 ms
23,700 KB
testcase_31 AC 144 ms
27,328 KB
testcase_32 AC 159 ms
21,712 KB
testcase_33 AC 207 ms
28,416 KB
testcase_34 AC 206 ms
25,460 KB
testcase_35 AC 123 ms
18,720 KB
testcase_36 AC 83 ms
16,208 KB
testcase_37 AC 120 ms
21,752 KB
権限があれば一括ダウンロードができます
コンパイルメッセージ
Syntax OK

ソースコード

diff #

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