Problem moneychanger
User Dana
Submission Time 2023-11-10 11:13:39
Score 0
Max Time N/A
Max Memory N/A

Compile Error

moneychanger.cpp: In function ‘int32_t main()’:
moneychanger.cpp:10:13: error: ‘coins’ was not declared in this scope; did you mean ‘cos’?
10 | if (i >= coins[j]){
| ^~~~~
| cos
moneychanger.cpp:11:5: error: ‘dp’ was not declared in this scope
11 | dp[i] = min(dp[i], dp[i - coins[j])] + 1);
| ^~
moneychanger.cpp:11:39: error: expected ‘]’ before ‘)’ token
11 | dp[i] = min(dp[i], dp[i - coins[j])] + 1);
| ^
| ]
moneychanger.cpp:15:6: error: ‘dp’ was not declared in this scope
15 | if (dp[v]==inf){
| ^~
moneychanger.cpp:15:13: error: ‘inf’ was not declared in this scope; did you mean ‘ynf’?
15 | if (dp[v]==inf){
| ^~~
| ynf
moneychanger.cpp:16:13: error: expected ‘;’ before ‘}’ token
16 | cout << -1
|