Given a floor of size n x m. Find the number of ways to tile the floor with tiles of size 1 x m

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.

https://ide.codingblocks.com/s/69958

now it gives wrong answer, 1 TC passed.

resolved on whatsapp PM