結果

問題 No.489 株に挑戦
ユーザー mmmpppmmmppp
提出日時 2017-02-25 23:53:36
言語 Ruby
(3.3.0)
結果
AC  
実行時間 306 ms / 1,000 ms
コード長 190 bytes
コンパイル時間 51 ms
コンパイル使用メモリ 11,476 KB
実行使用メモリ 30,228 KB
最終ジャッジ日時 2023-09-27 05:26:07
合計ジャッジ時間 7,009 ms
ジャッジサーバーID
(参考情報)
judge15 / judge13
外部呼び出し有り
このコードへのチャレンジ
(要ログイン)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 207 ms
21,800 KB
testcase_01 AC 183 ms
21,628 KB
testcase_02 AC 77 ms
15,164 KB
testcase_03 AC 76 ms
15,132 KB
testcase_04 AC 74 ms
15,332 KB
testcase_05 AC 75 ms
15,164 KB
testcase_06 AC 74 ms
15,088 KB
testcase_07 AC 72 ms
15,168 KB
testcase_08 AC 73 ms
15,144 KB
testcase_09 AC 73 ms
15,020 KB
testcase_10 AC 73 ms
15,024 KB
testcase_11 AC 73 ms
15,320 KB
testcase_12 AC 76 ms
15,116 KB
testcase_13 AC 75 ms
15,032 KB
testcase_14 AC 76 ms
15,248 KB
testcase_15 AC 82 ms
15,448 KB
testcase_16 AC 291 ms
25,228 KB
testcase_17 AC 92 ms
16,228 KB
testcase_18 AC 174 ms
21,292 KB
testcase_19 AC 163 ms
20,528 KB
testcase_20 AC 275 ms
24,496 KB
testcase_21 AC 119 ms
16,964 KB
testcase_22 AC 89 ms
15,548 KB
testcase_23 AC 160 ms
21,104 KB
testcase_24 AC 306 ms
27,628 KB
testcase_25 AC 74 ms
15,248 KB
testcase_26 AC 190 ms
24,668 KB
testcase_27 AC 140 ms
25,020 KB
testcase_28 AC 71 ms
15,228 KB
testcase_29 AC 76 ms
15,304 KB
testcase_30 AC 298 ms
28,656 KB
testcase_31 AC 172 ms
30,228 KB
testcase_32 AC 186 ms
21,088 KB
testcase_33 AC 299 ms
27,516 KB
testcase_34 AC 256 ms
23,916 KB
testcase_35 AC 147 ms
18,640 KB
testcase_36 AC 103 ms
16,520 KB
testcase_37 AC 185 ms
21,636 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).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