0_0_33317212_11385.cpp: In function 'int main()': 0_0_33317212_11385.cpp:52:76: error: 'p' was not declared in this scope dp[i+1]=((dp[i]+a[i]-dp[x[i]]+mod)%mod*s[i]%mod*qmi(r[i])%mod+dp[x[i]])%p; ^