PSHTBRTH - Editorial

@avi224 i can’t understand why Pishty will choose single 1 from [1 1] as they are playing optimally Pishty will choose max rectangle size. Can you clarify that ?

optimally means that Phishty won’t pick that move. Instead, she will pick [1] only out of the two consecutive ones. Then , Lotsy will have to pick only a [1] and then phishty will do so again and since then Lotsy won’t have any moves, the former wins.

1 Like

yeah, Got it

those 6 loops check all the possible state that can be visited from the current state.
It checks whether a submatrix has all ones in it or not. if it is having all ones then we clear that submatrix and goes to a lower state otherwise we break the loop.
Hope it helps :slight_smile:

1 Like

Thanks dude!! I REALLY was carving for a video editorial for this one!! Made my day!! THANKS AGAIN!! :slight_smile:

2 Likes

Thanks @vijju123 :slight_smile:

1 Like