Data commit
This commit is contained in:
parent
7387c8f97b
commit
cb5bb5e222
199093 changed files with 3378972 additions and 0 deletions
|
|
@ -0,0 +1,13 @@
|
|||
(de longinc (Lst)
|
||||
(let (D NIL R NIL)
|
||||
(for I Lst
|
||||
(cond
|
||||
((< I (last D))
|
||||
(for (Y . X) D
|
||||
(T (> X I) (set (nth D Y) I)) ) )
|
||||
((< I (car R))
|
||||
(set R I)
|
||||
(when D (set (cdr R) (last D))) )
|
||||
(T (when R (queue 'D (car R)))
|
||||
(push 'R I) ) ) )
|
||||
(flip R) ) )
|
||||
|
|
@ -0,0 +1,21 @@
|
|||
(de glutton (L)
|
||||
(let N (pop 'L)
|
||||
(maxi length
|
||||
(recur (N L)
|
||||
(ifn L
|
||||
(list (list N))
|
||||
(mapcan
|
||||
'((R)
|
||||
(if (> (car R) N)
|
||||
(list (cons N R) R)
|
||||
(list (list N) R) ) )
|
||||
(recurse (car L) (cdr L)) ) ) ) ) ) )
|
||||
|
||||
(test (2 4 5)
|
||||
(glutton (3 2 6 4 5 1)))
|
||||
|
||||
(test (2 6 9 11 15)
|
||||
(glutton (8 4 12 2 10 6 14 1 9 5 13 3 11 7 15)))
|
||||
|
||||
(test (-31 0 83 782)
|
||||
(glutton (4 65 2 -31 0 99 83 782 1)) )
|
||||
Loading…
Add table
Add a link
Reference in a new issue