結果

問題 No.489 株に挑戦
ユーザー mmmpppmmmppp
提出日時 2017-02-25 23:29:37
言語 Ruby
(3.3.0)
結果
TLE  
実行時間 -
コード長 199 bytes
コンパイル時間 48 ms
コンパイル使用メモリ 11,564 KB
実行使用メモリ 75,432 KB
最終ジャッジ日時 2023-09-02 08:18:34
合計ジャッジ時間 7,124 ms
ジャッジサーバーID
(参考情報)
judge14 / judge12
このコードへのチャレンジ
(要ログイン)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 219 ms
21,804 KB
testcase_01 AC 187 ms
21,524 KB
testcase_02 AC 81 ms
15,080 KB
testcase_03 AC 80 ms
15,192 KB
testcase_04 AC 82 ms
15,136 KB
testcase_05 AC 80 ms
15,180 KB
testcase_06 AC 78 ms
15,064 KB
testcase_07 AC 79 ms
15,208 KB
testcase_08 AC 80 ms
15,244 KB
testcase_09 AC 79 ms
15,096 KB
testcase_10 AC 80 ms
15,280 KB
testcase_11 AC 81 ms
15,064 KB
testcase_12 AC 81 ms
15,048 KB
testcase_13 AC 82 ms
15,312 KB
testcase_14 AC 82 ms
15,080 KB
testcase_15 AC 88 ms
15,616 KB
testcase_16 AC 308 ms
24,996 KB
testcase_17 AC 95 ms
16,072 KB
testcase_18 AC 183 ms
21,040 KB
testcase_19 AC 172 ms
20,464 KB
testcase_20 AC 283 ms
24,312 KB
testcase_21 AC 126 ms
16,880 KB
testcase_22 AC 97 ms
15,524 KB
testcase_23 AC 170 ms
20,964 KB
testcase_24 AC 311 ms
27,684 KB
testcase_25 AC 80 ms
15,260 KB
testcase_26 AC 198 ms
24,640 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]
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,f}
puts m[0]<1?0:[m.shift*K,m*' ']
0