Stax , 11 bytes CP437
ä¢⌠┐xntH↔BU
Unpacked version with 13 bytes:
B|AsF:10i^\=*
Finally tied Husk and beaten by Jelly by just one byte ...
Explanation
B Push tail (all except 1st row) of the input array, then push the head (1st row)
|A All elements in the head are truthy
This will be used as an accumulator
sF For each element in the tail, execute the rest of the program
:1 All truthy indices
0i^\ Expected truthy indices (0 and the current row number)
= The truthy indices are as expected
* Perform logical "and" with the accumulator
Implicit output of the final accumulator
ä¢⌠┐xntH↔BU
Unpacked version with 13 bytes:
B|AsF:10i^\=*
Finally tied Husk and beaten by Jelly by just one byte ...
Explanation
B Push tail (all except 1st row) of the input array, then push the head (1st row)
|A All elements in the head are truthy
This will be used as an accumulator
sF For each element in the tail, execute the rest of the program
:1 All truthy indices
0i^\ Expected truthy indices (0 and the current row number)
= The truthy indices are as expected
* Perform logical "and" with the accumulator
Implicit output of the final accumulator
Stax , 11 bytes CP437
ä¢⌠┐xntH↔BU
Unpacked version with 13 bytes:
B|AsF:10i^\=*
Finally tied Husk and beaten by Jelly by just one byte ...
Explanation
B Push tail (all except 1st row) of the input array, then push the head (1st row)
|A All elements in the head are truthy
This will be used as an accumulator
sF For each element in the tail, execute the rest of the program
:1 All truthy indices
0i^\ Expected truthy indices (0 and the current row number)
= The truthy indices are as expected
* Perform logical "and" with the accumulator
Implicit output of the final accumulator
Çoφ╕é┘`2x|◙╘▓╠█ä¢⌠┐xntH↔BU
Unpacked version with 1713 bytes:
Z+{|e}({Bsr+mB|AsF:fDm10i^\=*
Longer than I expectedFinally tied Husk and beaten by Jelly by just one byte ...
Explanation
Z+{|e}({Bsr+m:fDmB P
Z+ Push tail (all except 1st row) Prependsof the input array, withthen apush zero
the head {|e}(1st row)
|A Separate array intoAll partselements in the head are truthy
This will be used as an accumulator
Each partsF starts with an even number, followed by a run of odd numbers
For each element in the tail, execute the {rest of the program
m :1 For each part
All truthy indices
Bsr+ 0i^\ Reverse the oddExpected runtruthy andindices keep(0 and the headingcurrent evenrow number intact)
= :fD The truthy Flattenindices theare nestedas arrayexpected
and remove the heading zero
* Perform logical "and" with the maccumulator
Print the array, one element per line.
Implicit output of the final accumulator
Çoφ╕é┘`2x|◙╘▓╠█
Unpacked version with 17 bytes:
Z+{|e}({Bsr+m:fDm
Longer than I expected ...
Explanation
Z+{|e}({Bsr+m:fDm P
Z+ Prepends the array with a zero
{|e}( Separate array into parts
Each part starts with an even number, followed by a run of odd numbers
{ m For each part
Bsr+ Reverse the odd run and keep the heading even number intact
:fD Flatten the nested array and remove the heading zero
m Print the array, one element per line.
ä¢⌠┐xntH↔BU
Unpacked version with 13 bytes:
B|AsF:10i^\=*
Finally tied Husk and beaten by Jelly by just one byte ...
Explanation
B Push tail (all except 1st row) of the input array, then push the head (1st row)
|A All elements in the head are truthy
This will be used as an accumulator
sF For each element in the tail, execute the rest of the program
:1 All truthy indices
0i^\ Expected truthy indices (0 and the current row number)
= The truthy indices are as expected
* Perform logical "and" with the accumulator
Implicit output of the final accumulator
ä¢⌠┐xntH↔BUÇoφ╕é┘`2x|◙╘▓╠█
Unpacked version with 1317 bytes:
B|AsFZ+{|e}({Bsr+m:10i^\=*fDm
Finally tied Husk and beaten by Jelly by just one byteLonger than I expected ...
Explanation
BZ+{|e}({Bsr+m:fDm P
Z+ Push tail (all except 1st row) of thePrepends inputthe array, then push the headwith (1sta row)zero
|A {|e}( All elements in theSeparate headarray areinto truthyparts
This will be used as an accumulator
sF Each part starts with an even number, followed by a Forrun eachof elementodd innumbers
the tail, execute the rest of the{ program
m :1 For each part
All truthy indices
Bsr+ 0i^\ ExpectedReverse truthythe indicesodd (0run and keep the currentheading roweven number)
intact
= :fD The truthy indices areFlatten asthe expected
nested array and remove the heading zero
* Perform logical "and" with the accumulator
m Print the array, one element per line.
Implicit output of the final accumulator
ä¢⌠┐xntH↔BU
Unpacked version with 13 bytes:
B|AsF:10i^\=*
Finally tied Husk and beaten by Jelly by just one byte ...
Explanation
B Push tail (all except 1st row) of the input array, then push the head (1st row)
|A All elements in the head are truthy
This will be used as an accumulator
sF For each element in the tail, execute the rest of the program
:1 All truthy indices
0i^\ Expected truthy indices (0 and the current row number)
= The truthy indices are as expected
* Perform logical "and" with the accumulator
Implicit output of the final accumulator
Çoφ╕é┘`2x|◙╘▓╠█
Unpacked version with 17 bytes:
Z+{|e}({Bsr+m:fDm
Longer than I expected ...
Explanation
Z+{|e}({Bsr+m:fDm P
Z+ Prepends the array with a zero
{|e}( Separate array into parts
Each part starts with an even number, followed by a run of odd numbers
{ m For each part
Bsr+ Reverse the odd run and keep the heading even number intact
:fD Flatten the nested array and remove the heading zero
m Print the array, one element per line.