結果

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

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 204 ms
23,028 KB
testcase_01 AC 146 ms
21,972 KB
testcase_02 AC 82 ms
15,256 KB
testcase_03 AC 82 ms
15,156 KB
testcase_04 RE -
testcase_05 AC 81 ms
15,268 KB
testcase_06 AC 81 ms
15,308 KB
testcase_07 AC 81 ms
15,156 KB
testcase_08 AC 81 ms
15,028 KB
testcase_09 AC 82 ms
15,108 KB
testcase_10 AC 82 ms
15,308 KB
testcase_11 AC 82 ms
15,220 KB
testcase_12 AC 82 ms
15,152 KB
testcase_13 AC 83 ms
15,356 KB
testcase_14 AC 83 ms
15,244 KB
testcase_15 AC 89 ms
15,432 KB
testcase_16 AC 237 ms
26,948 KB
testcase_17 AC 95 ms
16,256 KB
testcase_18 AC 170 ms
21,408 KB
testcase_19 AC 134 ms
20,652 KB
testcase_20 AC 203 ms
25,048 KB
testcase_21 AC 102 ms
16,708 KB
testcase_22 AC 95 ms
15,708 KB
testcase_23 AC 157 ms
21,412 KB
testcase_24 AC 242 ms
28,100 KB
testcase_25 AC 82 ms
15,176 KB
testcase_26 RE -
testcase_27 AC 138 ms
22,544 KB
testcase_28 AC 82 ms
15,260 KB
testcase_29 RE -
testcase_30 AC 151 ms
23,484 KB
testcase_31 AC 162 ms
27,492 KB
testcase_32 AC 179 ms
21,580 KB
testcase_33 AC 231 ms
28,448 KB
testcase_34 AC 236 ms
25,476 KB
testcase_35 AC 140 ms
18,676 KB
testcase_36 AC 94 ms
16,300 KB
testcase_37 AC 140 ms
21,892 KB
権限があれば一括ダウンロードができます
コンパイルメッセージ
Syntax OK

ソースコード

diff #

n,d,K,*x=$<.read.split.map &:to_i
m=[0,0,0]
c=h=x.max
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