gap.cpp: In function 'long long int findGap(int, int)':
gap.cpp:12:47: warning: comparison of integer expressions of different signedness: 'std::vector<long long int>::size_type' {aka 'long unsigned int'} and 'int' [-Wsign-compare]
12 | while(cmin <= cmax && v1.size() + v2.size() < N) {
| ~~~~~~~~~~~~~~~~~~~~~~^~~
gap.cpp:19:16: warning: comparison of integer expressions of different signedness: 'int' and 'std::vector<long long int>::size_type' {aka 'long unsigned int'} [-Wsign-compare]
19 | for(int i=0;i<v1.size()-1;i++) amax = std::max(amax, v1[i+1] - v1[i]);
| ~^~~~~~~~~~~~
gap.cpp:20:16: warning: comparison of integer expressions of different signedness: 'int' and 'std::vector<long long int>::size_type' {aka 'long unsigned int'} [-Wsign-compare]
20 | for(int i=0;i<v2.size()-1;i++) amax = std::max(amax, v2[i] - v2[i+1]);
| ~^~~~~~~~~~~~
gap.cpp:32:15: error: 'max' was not declared in this scope; did you mean 'std::max'?
32 | i = max(i, 1ll);
| ^~~
| std::max
In file included from /usr/include/c++/10/bits/char_traits.h:39,
from /usr/include/c++/10/ios:40,
from /usr/include/c++/10/ostream:38,
from /usr/include/c++/10/iostream:39,
from gap.cpp:2:
/usr/include/c++/10/bits/stl_algobase.h:300:5: note: 'std::max' declared here
300 | max(const _Tp& __a, const _Tp& __b, _Compare __comp)
| ^~~