0_0_33914368_32091.cpp: In function 'll solve2()': 0_0_33914368_32091.cpp:26:12: error: 'i' was not declared in this scope dp[0] = q[i] ; ^