結果

問題 No.489 株に挑戦
ユーザー mmmpppmmmppp
提出日時 2017-02-25 22:01:42
言語 Ruby
(3.3.0)
結果
WA  
実行時間 -
コード長 212 bytes
コンパイル時間 91 ms
コンパイル使用メモリ 11,292 KB
実行使用メモリ 28,904 KB
最終ジャッジ日時 2023-09-02 08:15:38
合計ジャッジ時間 6,589 ms
ジャッジサーバーID
(参考情報)
judge15 / judge12
このコードへのチャレンジ
(要ログイン)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 199 ms
23,556 KB
testcase_01 AC 139 ms
21,852 KB
testcase_02 AC 82 ms
15,260 KB
testcase_03 AC 82 ms
15,228 KB
testcase_04 AC 82 ms
15,248 KB
testcase_05 AC 82 ms
15,124 KB
testcase_06 AC 82 ms
15,296 KB
testcase_07 AC 81 ms
15,080 KB
testcase_08 AC 83 ms
15,120 KB
testcase_09 AC 82 ms
15,072 KB
testcase_10 AC 83 ms
15,120 KB
testcase_11 AC 82 ms
15,176 KB
testcase_12 AC 82 ms
15,096 KB
testcase_13 AC 81 ms
15,072 KB
testcase_14 AC 82 ms
15,292 KB
testcase_15 AC 88 ms
15,568 KB
testcase_16 AC 196 ms
24,168 KB
testcase_17 AC 95 ms
16,052 KB
testcase_18 AC 165 ms
21,864 KB
testcase_19 AC 129 ms
20,020 KB
testcase_20 AC 200 ms
24,264 KB
testcase_21 AC 103 ms
17,072 KB
testcase_22 AC 96 ms
15,896 KB
testcase_23 AC 154 ms
21,660 KB
testcase_24 AC 237 ms
28,828 KB
testcase_25 AC 81 ms
15,064 KB
testcase_26 AC 192 ms
24,632 KB
testcase_27 WA -
testcase_28 AC 84 ms
15,288 KB
testcase_29 AC 83 ms
15,240 KB
testcase_30 AC 150 ms
23,692 KB
testcase_31 AC 162 ms
27,296 KB
testcase_32 AC 176 ms
22,196 KB
testcase_33 AC 228 ms
28,904 KB
testcase_34 AC 235 ms
26,516 KB
testcase_35 AC 136 ms
19,040 KB
testcase_36 AC 93 ms
16,284 KB
testcase_37 WA -
権限があれば一括ダウンロードができます
コンパイルメッセージ
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
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]}
h=f
c=a}
m[0]<1?p(0):puts(m[0]*K,m[1,2]*' ')
0