Problem | coinbag |
---|---|
User | zsinfo2010 |
Submission Time | 2023-11-15 15:03:49 |
Score | 0 |
Max Time | N/A |
Max Memory | N/A |
Owl Get a Life
coinbag.cpp:7:5: error: conflicting declaration ‘long long int m [505]’
7 | int m[505];
| ^
coinbag.cpp:5:8: note: previous declaration as ‘long long int m’
5 | int n, m, w[505], v[505];
| ^
coinbag.cpp: In function ‘int32_t main()’:
coinbag.cpp:17:25: error: invalid types ‘long long int[long long int]’ for array subscript
17 | if (j >= m[i]) {
| ^
coinbag.cpp:18:63: error: invalid types ‘long long int[long long int]’ for array subscript
18 | dp[i%2][j] = max(dp[i%2][j], dp[(i-1)%2][j-m[i]+v[i]]);
| ^