Question: Dynamic Programming and Bit Masking & Algorithms Practice Problems
I am unable to understand the editorial which states that we need a dp with 3 states.
I searched for Himanshu Jaju's solution, but couldn't understand a few lines(Line no: 41, why bits is used to + or - ways in answer?).
Link to sol: https://www.hackerearth.com/submission/8127452/