fork(6) download
  1. f s=and[all(j i-2<)[j$i-x|x<-s,x<i]|i<-[1..2*last s]]where j 0=0;j i=1+j(i-last(filter(<=i)s))
  2. main = print (f [1,2,3,99])
Success #stdin #stdout 0s 4704KB
stdin
Standard input is empty
stdout
True