boxes.cpp: In function 'long long int delivery(int, int, int, int*)':
boxes.cpp:5:24: error: 'min' was not declared in this scope; did you mean 'std::min'?
5 | ans = min(p[N-1]+min(p[N-1],L-p[N-1]),p[0]+min(p[0],L-p[0]));
| ^~~
| std::min
In file included from /usr/include/c++/10/algorithm:62,
from /usr/include/x86_64-linux-gnu/c++/10/bits/stdc++.h:65,
from boxes.cpp:2:
/usr/include/c++/10/bits/stl_algo.h:3474:5: note: 'std::min' declared here
3474 | min(initializer_list<_Tp> __l, _Compare __comp)
| ^~~
boxes.cpp:5:13: error: 'min' was not declared in this scope; did you mean 'std::min'?
5 | ans = min(p[N-1]+min(p[N-1],L-p[N-1]),p[0]+min(p[0],L-p[0]));
| ^~~
| std::min
In file included from /usr/include/c++/10/algorithm:62,
from /usr/include/x86_64-linux-gnu/c++/10/bits/stdc++.h:65,
from boxes.cpp:2:
/usr/include/c++/10/bits/stl_algo.h:3474:5: note: 'std::min' declared here
3474 | min(initializer_list<_Tp> __l, _Compare __comp)
| ^~~
boxes.cpp:3:31: warning: unused parameter 'K' [-Wunused-parameter]
3 | long long delivery(int N, int K, int L, int p[]) {
| ~~~~^