Problem coinbag
User eulerleonhardfan
Submission Time 2023-02-10 10:30:03
Score 0
Max Time N/A
Max Memory N/A

Compile Error

coinbag.cpp:2:3: error: ‘cin’ does not name a type
2 | cin >> n >> w;
| ^~~
coinbag.cpp:3:10: error: array bound is not an integer constant before ‘]’ token
3 | int v[n], weight[n];
| ^
coinbag.cpp:3:21: error: array bound is not an integer constant before ‘]’ token
3 | int v[n], weight[n];
| ^
coinbag.cpp:4:3: error: expected unqualified-id before ‘for’
4 | for (int i = 0; i < n; i++) {
| ^~~
coinbag.cpp:4:19: error: ‘i’ does not name a type
4 | for (int i = 0; i < n; i++) {
| ^
coinbag.cpp:4:26: error: ‘i’ does not name a type
4 | for (int i = 0; i < n; i++) {
| ^
coinbag.cpp:7:13: error: array bound is not an integer constant before ‘]’ token
7 | int dp[w+1];
| ^
coinbag.cpp:9:3: error: expected unqualified-id before ‘for’
9