結果

問題 No.489 株に挑戦
ユーザー mmmpppmmmppp
提出日時 2017-02-25 23:48:04
言語 Ruby
(3.3.0)
結果
AC  
実行時間 303 ms / 1,000 ms
コード長 196 bytes
コンパイル時間 272 ms
コンパイル使用メモリ 11,216 KB
実行使用メモリ 30,288 KB
最終ジャッジ日時 2023-09-27 05:23:49
合計ジャッジ時間 7,210 ms
ジャッジサーバーID
(参考情報)
judge15 / judge12
このコードへのチャレンジ
(要ログイン)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 204 ms
21,760 KB
testcase_01 AC 178 ms
21,600 KB
testcase_02 AC 74 ms
15,272 KB
testcase_03 AC 76 ms
15,232 KB
testcase_04 AC 74 ms
15,152 KB
testcase_05 AC 75 ms
15,088 KB
testcase_06 AC 70 ms
15,012 KB
testcase_07 AC 72 ms
15,164 KB
testcase_08 AC 73 ms
15,016 KB
testcase_09 AC 75 ms
15,160 KB
testcase_10 AC 71 ms
15,284 KB
testcase_11 AC 72 ms
15,132 KB
testcase_12 AC 72 ms
15,324 KB
testcase_13 AC 75 ms
15,008 KB
testcase_14 AC 74 ms
15,008 KB
testcase_15 AC 78 ms
15,564 KB
testcase_16 AC 283 ms
25,160 KB
testcase_17 AC 86 ms
16,144 KB
testcase_18 AC 170 ms
21,104 KB
testcase_19 AC 154 ms
20,492 KB
testcase_20 AC 261 ms
24,496 KB
testcase_21 AC 112 ms
16,680 KB
testcase_22 AC 89 ms
15,792 KB
testcase_23 AC 157 ms
21,088 KB
testcase_24 AC 286 ms
27,644 KB
testcase_25 AC 72 ms
15,288 KB
testcase_26 AC 182 ms
24,852 KB
testcase_27 AC 141 ms
24,828 KB
testcase_28 AC 77 ms
15,364 KB
testcase_29 AC 76 ms
15,308 KB
testcase_30 AC 303 ms
28,620 KB
testcase_31 AC 164 ms
30,288 KB
testcase_32 AC 175 ms
21,252 KB
testcase_33 AC 278 ms
27,376 KB
testcase_34 AC 244 ms
23,784 KB
testcase_35 AC 141 ms
18,552 KB
testcase_36 AC 99 ms
16,516 KB
testcase_37 AC 182 ms
21,768 KB
権限があれば一括ダウンロードができます
コンパイルメッセージ
Syntax OK

ソースコード

diff #

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