0_0_30235458_21221.cpp: In function 'int main()': 0_0_30235458_21221.cpp:42:20: error: 'sum' was not declared in this scope dp[i]=(sum[i-1]+sum[i])%mod; ^