結果

問題 No.489 株に挑戦
ユーザー mmmpppmmmppp
提出日時 2017-02-25 21:52:09
言語 Ruby
(3.3.0)
結果
RE  
実行時間 -
コード長 208 bytes
コンパイル時間 76 ms
コンパイル使用メモリ 11,336 KB
実行使用メモリ 27,384 KB
最終ジャッジ日時 2023-09-02 08:15:00
合計ジャッジ時間 6,232 ms
ジャッジサーバーID
(参考情報)
judge15 / judge11
このコードへのチャレンジ
(要ログイン)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 210 ms
22,896 KB
testcase_01 AC 143 ms
21,900 KB
testcase_02 AC 83 ms
15,160 KB
testcase_03 AC 83 ms
15,072 KB
testcase_04 AC 82 ms
15,068 KB
testcase_05 AC 84 ms
15,224 KB
testcase_06 AC 85 ms
15,336 KB
testcase_07 AC 83 ms
15,268 KB
testcase_08 AC 83 ms
15,028 KB
testcase_09 AC 85 ms
15,364 KB
testcase_10 AC 83 ms
15,072 KB
testcase_11 AC 85 ms
15,300 KB
testcase_12 AC 86 ms
15,284 KB
testcase_13 AC 83 ms
15,260 KB
testcase_14 AC 83 ms
15,260 KB
testcase_15 AC 91 ms
15,356 KB
testcase_16 AC 242 ms
27,136 KB
testcase_17 AC 95 ms
16,060 KB
testcase_18 AC 168 ms
21,460 KB
testcase_19 AC 133 ms
20,772 KB
testcase_20 AC 202 ms
25,144 KB
testcase_21 RE -
testcase_22 AC 94 ms
15,724 KB
testcase_23 RE -
testcase_24 RE -
testcase_25 AC 83 ms
15,072 KB
testcase_26 AC 199 ms
24,696 KB
testcase_27 AC 141 ms
22,340 KB
testcase_28 AC 85 ms
15,124 KB
testcase_29 AC 83 ms
15,064 KB
testcase_30 RE -
testcase_31 AC 165 ms
27,384 KB
testcase_32 RE -
testcase_33 RE -
testcase_34 AC 234 ms
25,616 KB
testcase_35 RE -
testcase_36 RE -
testcase_37 RE -
権限があれば一括ダウンロードができます
コンパイルメッセージ
Syntax OK

ソースコード

diff #

n,d,K,*x=$<.read.split.map &:to_i
m=[0,0,0]
c=h=$$*$$
n.times{|j|f=[j+d,n-1].min
a=x[j]
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[0]*K,m[1,2]*' ']
0