Code: https://ide.codingblocks.com/s/69916
Gives run time error.
I have tried #define mod 1000000007 to avoid overflow (how this #define mod helps avoid overflow?), it doesn’t work.
Code: https://ide.codingblocks.com/s/69916
Gives run time error.
I have tried #define mod 1000000007 to avoid overflow (how this #define mod helps avoid overflow?), it doesn’t work.
Make Dp vector of 10^6 . Currently it is accessing invalid index.
resolved on whatsapp PM