Problem moneychanger
User cobnet
Submission Time 2025-03-12 23:48:37
Score 0
Max Time N/A
Max Memory N/A

Compile Error

moneychanger.cpp: In function ‘int main()’:
moneychanger.cpp:3:5: error: ‘cin’ was not declared in this scope
3 | cin >> n >> v;
| ^~~
moneychanger.cpp:4:5: error: ‘vector’ was not declared in this scope
4 | vector<int> coins(n);
| ^~~~~~
moneychanger.cpp:4:12: error: expected primary-expression before ‘int’
4 | vector<int> coins(n);
| ^~~
moneychanger.cpp:6:16: error: ‘coins’ was not declared in this scope
6 | cin >> coins[i];
| ^~~~~
moneychanger.cpp:8:12: error: expected primary-expression before ‘int’
8 | vector<int> dp(v + 1, INT_MAX);
| ^~~
moneychanger.cpp:9:5: error: ‘dp’ was not declared in this scope
9 | dp[0] = 0;
| ^~
moneychanger.cpp:11:22: error: ‘coins’ was not declared in this scope
11 | for (int j = coins[i]; j <= v; j++) {