結果

問題 No.489 株に挑戦
ユーザー mmmpppmmmppp
提出日時 2017-02-25 23:51:11
言語 Ruby
(3.3.0)
結果
AC  
実行時間 314 ms / 1,000 ms
コード長 193 bytes
コンパイル時間 63 ms
コンパイル使用メモリ 11,548 KB
実行使用メモリ 30,144 KB
最終ジャッジ日時 2023-09-27 05:26:26
合計ジャッジ時間 7,457 ms
ジャッジサーバーID
(参考情報)
judge13 / judge14
このコードへのチャレンジ
(要ログイン)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 225 ms
21,940 KB
testcase_01 AC 189 ms
21,636 KB
testcase_02 AC 82 ms
15,092 KB
testcase_03 AC 82 ms
15,064 KB
testcase_04 AC 81 ms
15,140 KB
testcase_05 AC 81 ms
15,144 KB
testcase_06 AC 81 ms
15,088 KB
testcase_07 AC 82 ms
15,264 KB
testcase_08 AC 81 ms
15,096 KB
testcase_09 AC 81 ms
15,156 KB
testcase_10 AC 82 ms
15,020 KB
testcase_11 AC 82 ms
15,292 KB
testcase_12 AC 82 ms
15,164 KB
testcase_13 AC 82 ms
15,248 KB
testcase_14 AC 81 ms
15,128 KB
testcase_15 AC 89 ms
15,472 KB
testcase_16 AC 311 ms
25,068 KB
testcase_17 AC 97 ms
16,012 KB
testcase_18 AC 185 ms
21,072 KB
testcase_19 AC 169 ms
20,424 KB
testcase_20 AC 282 ms
24,460 KB
testcase_21 AC 124 ms
16,756 KB
testcase_22 AC 96 ms
15,724 KB
testcase_23 AC 170 ms
21,100 KB
testcase_24 AC 314 ms
27,364 KB
testcase_25 AC 81 ms
15,156 KB
testcase_26 AC 198 ms
24,712 KB
testcase_27 AC 147 ms
24,788 KB
testcase_28 AC 82 ms
15,320 KB
testcase_29 AC 82 ms
15,072 KB
testcase_30 AC 310 ms
28,276 KB
testcase_31 AC 174 ms
30,144 KB
testcase_32 AC 193 ms
21,056 KB
testcase_33 AC 301 ms
27,552 KB
testcase_34 AC 267 ms
23,728 KB
testcase_35 AC 154 ms
18,692 KB
testcase_36 AC 110 ms
16,756 KB
testcase_37 AC 199 ms
21,580 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