0_0_21312382_22351.cpp: In function 'int main()': 0_0_21312382_22351.cpp:90:39: error: 'i' was not declared in this scope ans = (ans + wei[mxl-i]*fun[j]*ran[i][j]) % MOD; ^