Peak Detection by shinh

a=$<.map{|v|v.to_i}
i=-1;puts"#$v#{[a[0,i].reverse,a[i,9]].all?{|_|_.find{|w|$v<w&&break;w+9<$v}}?:*:$_}"while$v=a[i+=1]

Note that non-ascii characters in the above source code will be escaped (such as \x9f).

download

return top