two-column numeric table into a 1-column table of boxes in which each box

contains an infix of the rows of the original table corresponding to

consecutive rows in which the items of the last column are nonnegative.

NB. Locate nonnegative items

m0=. 0: <: [: {: ]

NB. Delete 0's and change all 1's except leading 1 to 0

m1=. ] # 2: </\ 0: , ]

NB. 1-column table of boxed partitions of y delimited by 1's in x

d2=. [: ,. # <;.1~ [: m1 [

NB. Assembled components solve McLean's problem

m3=. m0"1 d2 ]

Eugene McDonnell