結果
問題 |
No.489 株に挑戦
|
ユーザー |
![]() |
提出日時 | 2017-02-25 16:06:14 |
言語 | Ruby (3.4.1) |
結果 |
TLE
|
実行時間 | - |
コード長 | 161 bytes |
コンパイル時間 | 89 ms |
コンパイル使用メモリ | 7,680 KB |
実行使用メモリ | 27,520 KB |
最終ジャッジ日時 | 2024-06-11 14:58:22 |
合計ジャッジ時間 | 3,228 ms |
ジャッジサーバーID (参考情報) |
judge4 / judge2 |
(要ログイン)
ファイルパターン | 結果 |
---|---|
sample | -- * 3 |
other | AC * 1 TLE * 1 -- * 33 |
コンパイルメッセージ
Main.rb:7: warning: ambiguous first argument; put parentheses or a space even after `-' operator Syntax OK
ソースコード
n,d,k,*x=$<.read.split.map &:to_i y=(0...n-d).map{|i|l=x[i+1,d];m=l.max;[m-x[i],-i,-l.index(m)-i-1]}.max if y[0]<1 p 0 else p y[0]*k print -y[1],' ',-y[2] end