Count distict subsequences

https://hack.codingblocks.com/app/contests/1236/1101/problem https://ide.codingblocks.com/s/275858 why all of my test cases are failing but i am getting correct op

hello @Ayush_Gupta
use long long in place of int.

and use mod property here
image

property -> (a-b)%mod = (a-b + mod) %mod.

image
this is wrong.
u have to return dp[n]