Data commit

This commit is contained in:
Ingy döt Net 2023-07-01 11:58:00 -04:00
parent 7387c8f97b
commit cb5bb5e222
199093 changed files with 3378972 additions and 0 deletions

View file

@ -0,0 +1,21 @@
lcs{
⎕IO0
betterof{(</+/¨ ) } ⍝ better of 2 selections
cmbn{,.,/(),} ⍝ combine lists
rr{/>/1 ¯1[1]¨} ⍝ rising rows
hmrr{/(rr )/=\} ⍝ has monotonically rising rows
rnbc{{/}¨[0]×} ⍝ row numbers by column
validhmrrcmbnrnbc ⍝ any valid solutions?
a w(</¨ ) ⍝ longest first
matchesa.=w
aps{[;+]}{(/2)2*} ⍝ all possible subsequences
swps{/~(~)} ⍝ subsequences with possible solns
ssttmatches swps apsw ⍝ subsequences to try
w/{
0 ⍝ initial selection
(+/)+/[;0]: ⍝ no scope to improve
this betterof{×valid /matches}[;0] ⍝ try to improve
1=1:this ⍝ nothing left to try
this 1[1] ⍝ keep looking
}sstt
}