0_0_30570116_7360.cpp: In function 'int main()': 0_0_30570116_7360.cpp:49:30: error: 'c' was not declared in this scope sum[i+1]=(sum[i]+c*a%mod+mid*(c-1+mod)%mod)%mod; ^