結果

問題 No.489 株に挑戦
ユーザー mmmpppmmmppp
提出日時 2017-02-26 23:02:05
言語 Ruby
(3.2.2)
結果
AC  
実行時間 311 ms / 1,000 ms
コード長 184 bytes
コンパイル時間 301 ms
コンパイル使用メモリ 11,156 KB
実行使用メモリ 24,784 KB
最終ジャッジ日時 2023-09-27 05:28:46
合計ジャッジ時間 7,917 ms
ジャッジサーバーID
(参考情報)
judge12 / judge14
外部呼び出し有り
このコードへのチャレンジ(β)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 225 ms
22,200 KB
testcase_01 AC 189 ms
20,192 KB
testcase_02 AC 83 ms
15,104 KB
testcase_03 AC 85 ms
15,256 KB
testcase_04 AC 84 ms
15,172 KB
testcase_05 AC 87 ms
15,268 KB
testcase_06 AC 83 ms
15,116 KB
testcase_07 AC 84 ms
15,076 KB
testcase_08 AC 84 ms
15,152 KB
testcase_09 AC 84 ms
15,132 KB
testcase_10 AC 84 ms
15,208 KB
testcase_11 AC 83 ms
15,092 KB
testcase_12 AC 84 ms
15,224 KB
testcase_13 AC 83 ms
15,244 KB
testcase_14 AC 85 ms
15,104 KB
testcase_15 AC 93 ms
15,412 KB
testcase_16 AC 296 ms
23,236 KB
testcase_17 AC 99 ms
16,132 KB
testcase_18 AC 181 ms
20,088 KB
testcase_19 AC 167 ms
19,100 KB
testcase_20 AC 276 ms
23,548 KB
testcase_21 AC 126 ms
16,592 KB
testcase_22 AC 96 ms
15,628 KB
testcase_23 AC 170 ms
20,400 KB
testcase_24 AC 304 ms
24,780 KB
testcase_25 AC 83 ms
15,264 KB
testcase_26 AC 218 ms
24,784 KB
testcase_27 AC 160 ms
24,580 KB
testcase_28 AC 84 ms
15,152 KB
testcase_29 AC 83 ms
15,096 KB
testcase_30 AC 311 ms
24,764 KB
testcase_31 AC 176 ms
24,784 KB
testcase_32 AC 195 ms
20,412 KB
testcase_33 AC 291 ms
24,764 KB
testcase_34 AC 266 ms
23,104 KB
testcase_35 AC 159 ms
17,740 KB
testcase_36 AC 113 ms
16,068 KB
testcase_37 AC 195 ms
20,560 KB
権限があれば一括ダウンロードができます
コンパイルメッセージ
Syntax OK

ソースコード

diff #

n,d,K,*x=`dd`.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).any?{|k|v=x[k]-a;v>m[0]&&m=[v,j,k];v<0}
c,h=a-1,f}
puts m[0]<1?0:[m.shift*K,m*' ']
0