boxes.cpp: In function 'long long int delivery(int, int, int, int*)':
boxes.cpp:8:12: error: 'min' was not declared in this scope
mi[i]=min(abs(L-p[i]),abs(p[i]))*2;
^~~
boxes.cpp:8:12: note: suggested alternative:
In file included from /usr/include/c++/7/algorithm:62:0,
from /usr/include/x86_64-linux-gnu/c++/7/bits/stdc++.h:65,
from boxes.cpp:2:
/usr/include/c++/7/bits/stl_algo.h:3456:5: note: 'std::min'
min(initializer_list<_Tp> __l, _Compare __comp)
^~~
boxes.cpp:10:2: error: 'sort' was not declared in this scope
sort(mi+1,mi+1+N);
^~~~
boxes.cpp:10:2: note: suggested alternative:
In file included from /usr/include/c++/7/algorithm:62:0,
from /usr/include/x86_64-linux-gnu/c++/7/bits/stdc++.h:65,
from boxes.cpp:2:
/usr/include/c++/7/bits/stl_algo.h:4856:5: note: 'std::sort'
sort(_RandomAccessIterator __first, _RandomAccessIterator __last,
^~~~
boxes.cpp:15:7: error: 'max' was not declared in this scope
val=max(mi[i],val);
^~~
boxes.cpp:15:7: note: suggested alternative:
In file included from /usr/include/c++/7/algorithm:62:0,
from /usr/include/x86_64-linux-gnu/c++/7/bits/stdc++.h:65,
from boxes.cpp:2:
/usr/include/c++/7/bits/stl_algo.h:3468:5: note: 'std::max'
max(initializer_list<_Tp> __l, _Compare __comp)
^~~