My code is not working please check

code ide is https://ide.codingblocks.com/s/137563

Your code is getting integer overflow for big larger n and m. Use memoization along with stepwise mod.
(a+b)%mod = (a%mod + b%mod)%mod.