0_0_34962663_13216.cpp: In function 'int main()': 0_0_34962663_13216.cpp:46:21: error: 'maxx' was not declared in this scope cout << sum + 5 - maxx - dp[n - 1][sum] << endl; ^