fork download
  1. (println
  2. (map
  3. (fn[x](apply max(map #(-(apply max(% 1))(apply min(% 0)))(map #(split-at % x)(range 1(count x))))))
  4. [
  5. [1,2,3,4,5] ; 4
  6. [1,99,2,105] ; 104
  7. [99,1,99,100] ; 99
  8. [99,1,1,2,1,3] ; 2
  9. [5,4,3,3,1] ; 0
  10. [5,4,3,1] ; -1
  11. [5,2,1] ; -1
  12. [5,4,1] ; -1
  13. [55,45,20,1] ; -10
  14. [5,1] ; -4
  15. [10,7,5,1] ; -2
  16. ]))
Success #stdin #stdout 2.06s 335552KB
stdin
Standard input is empty
stdout
(4 104 99 2 0 -1 -1 -1 -10 -4 -2)