結果

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

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 210 ms
23,752 KB
testcase_01 AC 200 ms
22,160 KB
testcase_02 AC 81 ms
15,156 KB
testcase_03 AC 83 ms
15,304 KB
testcase_04 AC 83 ms
15,072 KB
testcase_05 AC 83 ms
15,160 KB
testcase_06 AC 81 ms
15,112 KB
testcase_07 AC 82 ms
15,108 KB
testcase_08 AC 83 ms
15,280 KB
testcase_09 AC 83 ms
15,184 KB
testcase_10 AC 83 ms
15,160 KB
testcase_11 AC 82 ms
15,156 KB
testcase_12 AC 82 ms
15,108 KB
testcase_13 AC 82 ms
15,272 KB
testcase_14 AC 83 ms
15,224 KB
testcase_15 AC 88 ms
15,456 KB
testcase_16 AC 319 ms
28,092 KB
testcase_17 AC 96 ms
16,144 KB
testcase_18 AC 177 ms
21,984 KB
testcase_19 AC 173 ms
20,908 KB
testcase_20 AC 293 ms
26,800 KB
testcase_21 AC 132 ms
16,740 KB
testcase_22 AC 95 ms
15,956 KB
testcase_23 AC 156 ms
21,452 KB
testcase_24 AC 316 ms
28,944 KB
testcase_25 AC 83 ms
15,308 KB
testcase_26 AC 194 ms
24,632 KB
testcase_27 TLE -
testcase_28 -- -
testcase_29 -- -
testcase_30 -- -
testcase_31 -- -
testcase_32 -- -
testcase_33 -- -
testcase_34 -- -
testcase_35 -- -
testcase_36 -- -
testcase_37 -- -
権限があれば一括ダウンロードができます
コンパイルメッセージ
Syntax OK

ソースコード

diff #

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