The following problem: Your text to link here... requires DP + 2D BIT according to comment section but I have never used 2D BIT anywhere except for learning its basic concept. Can someone explain how to solve this problem using this concept? Thanks in advance.
It can be solved in 1D bit+dp (no need for 2D or maybe it is another solution) but try solving it with only dp then you can realize where the bit can be used (You will change a loop to bit).
Thanks!! Will look into it.