結果

問題 No.489 株に挑戦
ユーザー mmmpppmmmppp
提出日時 2017-03-08 15:48:41
言語 Ruby
(3.2.2)
結果
AC  
実行時間 320 ms / 1,000 ms
コード長 186 bytes
コンパイル時間 609 ms
コンパイル使用メモリ 11,184 KB
実行使用メモリ 33,828 KB
最終ジャッジ日時 2023-09-27 05:37:38
合計ジャッジ時間 7,857 ms
ジャッジサーバーID
(参考情報)
judge14 / judge12
このコードへのチャレンジ(β)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 226 ms
28,504 KB
testcase_01 AC 184 ms
24,036 KB
testcase_02 AC 79 ms
15,280 KB
testcase_03 AC 76 ms
15,092 KB
testcase_04 AC 76 ms
15,188 KB
testcase_05 AC 76 ms
15,256 KB
testcase_06 AC 75 ms
15,128 KB
testcase_07 AC 76 ms
15,196 KB
testcase_08 AC 77 ms
15,056 KB
testcase_09 AC 77 ms
15,124 KB
testcase_10 AC 76 ms
15,000 KB
testcase_11 AC 77 ms
15,068 KB
testcase_12 AC 75 ms
15,080 KB
testcase_13 AC 77 ms
15,072 KB
testcase_14 AC 76 ms
15,092 KB
testcase_15 AC 86 ms
15,944 KB
testcase_16 AC 296 ms
29,908 KB
testcase_17 AC 94 ms
17,300 KB
testcase_18 AC 179 ms
23,724 KB
testcase_19 AC 163 ms
21,800 KB
testcase_20 AC 277 ms
30,352 KB
testcase_21 AC 119 ms
18,984 KB
testcase_22 AC 93 ms
16,436 KB
testcase_23 AC 172 ms
24,652 KB
testcase_24 AC 320 ms
33,228 KB
testcase_25 AC 76 ms
15,284 KB
testcase_26 AC 223 ms
33,828 KB
testcase_27 AC 166 ms
33,736 KB
testcase_28 AC 79 ms
15,312 KB
testcase_29 AC 84 ms
15,168 KB
testcase_30 AC 311 ms
33,080 KB
testcase_31 AC 184 ms
33,700 KB
testcase_32 AC 196 ms
24,752 KB
testcase_33 AC 302 ms
32,380 KB
testcase_34 AC 267 ms
30,420 KB
testcase_35 AC 155 ms
21,180 KB
testcase_36 AC 106 ms
17,076 KB
testcase_37 AC 196 ms
24,304 KB
権限があれば一括ダウンロードができます
コンパイルメッセージ
Syntax OK

ソースコード

diff #

eval'N,D,K,*X='+$<.read.split*?,
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