gap.cpp: In function 'long long int findGap(int, int)':
gap.cpp:10:3: error: 'll' was not declared in this scope
ll vec[n];
^
gap.cpp:13:30: error: invalid conversion from 'long long int' to 'long long int*' [-fpermissive]
MinMax(left, right, mn, mx);
^
In file included from gap.cpp:2:0:
gap.h:1:6: note: initializing argument 3 of 'void MinMax(long long int, long long int, long long int*, long long int*)'
void MinMax(long long, long long, long long*, long long*);
^
gap.cpp:13:30: error: invalid conversion from 'long long int' to 'long long int*' [-fpermissive]
MinMax(left, right, mn, mx);
^
In file included from gap.cpp:2:0:
gap.h:1:6: note: initializing argument 4 of 'void MinMax(long long int, long long int, long long int*, long long int*)'
void MinMax(long long, long long, long long*, long long*);
^
gap.cpp:14:4: error: 'vec' was not declared in this scope
vec[cnt++] = mn;
^
gap.cpp:20:8: error: 'vec' was not declared in this scope
sort(vec, vec + n);
^
gap.cpp:20:20: error: 'sort' was not declared in this scope
sort(vec, vec + n);
^
gap.cpp:20:20: note: suggested alternative:
In file included from /usr/include/c++/5/algorithm:62:0,
from /usr/include/x86_64-linux-gnu/c++/5/bits/stdc++.h:64,
from gap.cpp:1:
/usr/include/c++/5/bits/stl_algo.h:4718:5: note: 'std::sort'
sort(_RandomAccessIterator __first, _RandomAccessIterator __last,
^
gap.cpp:23:38: error: 'max' was not declared in this scope
ans = max(ans, vec[i] - vec[i - 1]);
^
gap.cpp:23:38: note: suggested alternative:
In file included from /usr/include/c++/5/algorithm:62:0,
from /usr/include/x86_64-linux-gnu/c++/5/bits/stdc++.h:64,
from gap.cpp:1:
/usr/include/c++/5/bits/stl_algo.h:3463:5: note: 'std::max'
max(initializer_list<_Tp> __l, _Compare __comp)
^