Problem boxes
User PlayVoltz
Submission Time 2024-03-01 08:25:35
Score 0
Max Time N/A
Max Memory N/A

Compile Error

boxes.cpp: In function ‘long long int delivery(int, int, int, int*)’:
boxes.cpp:13:17: error: declaration of ‘std::vector<long long int> l’ shadows a parameter
13 | vector<int> l(n), r(n);
| ^
boxes.cpp:15:35: error: no match for ‘operator-’ (operand types are ‘std::vector<long long int>’ and ‘int’)
15 | for (int i=n-1; i>=0; --i)r[i]=(l-pos[i])*2+(i+k<n?l[i+k]:0);
| ~^~~~~~~
| | |
| | int
| std::vector<long long int>
In file included from /usr/include/c++/9/bits/stl_algobase.h:67,
from /usr/include/c++/9/bits/specfun.h:45,
from /usr/include/c++/9/cmath:1927,
from /usr/include/x86_64-linux-gnu/c++/9/bits/stdc++.h:41,
from boxes.cpp:2:
/usr/include/c++/9