gap.cpp: In function 'long long int findGap(int, int)':
gap.cpp:12:31: 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(L.size() + R.size() < N){
| ~~~~~~~~~~~~~~~~~~~~^~~
gap.cpp:15:20: error: invalid type argument of unary '*' (have 'long long int')
15 | L.push_back(*mn);
| ^~
gap.cpp:16:20: error: invalid type argument of unary '*' (have 'long long int')
16 | R.push_back(*mx);
| ^~
gap.cpp:18:13: error: invalid type argument of unary '*' (have 'long long int')
18 | LO = *mn + 1;
| ^~
gap.cpp:19:13: error: invalid type argument of unary '*' (have 'long long int')
19 | HI = *mx - 1;
| ^~
gap.cpp:29:23: warning: comparison of integer expressions of different signedness: 'int' and 'std::vector<long long int>::size_type' {aka 'long unsigned int'} [-Wsign-compare]
29 | for(int i = 1; i < v.size(); i++)
| ~~^~~~~~~~~~
gap.cpp:33:38: error: invalid conversion from 'long long int' to 'long long int*' [-fpermissive]
33 | MinMax(0, 1000000000000000000, mn, mx);
| ^~
| |
| long long int
In file included from gap.cpp:1:
gap.h:1:35: note: initializing argument 3 of 'void MinMax(long long int, long long int, long long int*, long long int*)'
1 | void MinMax(long long, long long, long long*, long long*);
| ^~~~~~~~~~
gap.cpp:33:42: error: invalid conversion from 'long long int' to 'long long int*' [-fpermissive]
33 | MinMax(0, 1000000000000000000, mn, mx);
| ^~
| |
| long long int
In file included from gap.cpp:1:
gap.h:1:47: note: initializing argument 4 of 'void MinMax(long long int, long long int, long long int*, long long int*)'
1 | void MinMax(long long, long long, long long*, long long*);
| ^~~~~~~~~~
gap.cpp:37:14: error: 'll' was not declared in this scope
37 | vector<ll> v({mn, mx});
| ^~
gap.cpp:37:16: error: template argument 1 is invalid
37 | vector<ll> v({mn, mx});
| ^
gap.cpp:37:16: error: template argument 2 is invalid
gap.cpp:37:28: warning: list-initializer for non-class type must not be parenthesized
37 | vector<ll> v({mn, mx});
| ^
gap.cpp:37:28: error: cannot convert '<brace-enclosed initializer list>' to 'int' in initialization
gap.cpp:41:22: error: invalid types 'int[int]' for array subscript
41 | while(cur < v[1]) {
| ^
gap.cpp:43:28: error: invalid types 'int[int]' for array subscript
43 | MinMax(cur, min(v[1] - 1, cur + d - 1), &mn, &mx);
| ^
gap.cpp:48:11: error: request for member 'push_back' in 'v', which is of non-class type 'int'
48 | v.push_back(mn);
| ^~~~~~~~~
gap.cpp:49:11: error: request for member 'push_back' in 'v', which is of non-class type 'int'
49 | v.push_back(mx);
| ^~~~~~~~~
gap.cpp:53:14: error: request for member 'begin' in 'v', which is of non-class type 'int'
53 | sort(v.begin(),v.end());
| ^~~~~
gap.cpp:53:24: error: request for member 'end' in 'v', which is of non-class type 'int'
53 | sort(v.begin(),v.end());
| ^~~
gap.cpp:55:28: error: request for member 'size' in 'v', which is of non-class type 'int'
55 | for(int i = 1; i < v.size(); i++)
| ^~~~
gap.cpp:56:27: error: invalid types 'int[int]' for array subscript
56 | ans = max(ans, v[i] - v[i-1]);
| ^
gap.cpp:56:36: error: invalid types 'int[int]' for array subscript
56 | ans = max(ans, v[i] - v[i-1]);
| ^