gap.cpp:19:21: warning: overflow in conversion from 'double' to 'int' changes value from '1.0e+18' to '2147483647' [-Woverflow]
19 | const int oo = 1e18 + 7, mod = 1e9 + 7;
| ~~~~~^~~
gap.cpp: In function 'long long int findgap(int, int)':
gap.cpp:26:30: warning: overflow in conversion from 'double' to 'int' changes value from '1.0e+18' to '2147483647' [-Woverflow]
26 | int lstx = 0, lsty = 1e18, a, b;
| ^~~~
gap.cpp:28:30: error: 'n' was not declared in this scope
28 | for(int i = 1; i <= (n + 1) / 2; i++){
| ^
gap.cpp:29:32: error: cannot convert 'int*' to 'long long int*'
29 | MinMax(lstx, lsty, &a, &b);
| ^~
| |
| int*
In file included from gap.cpp:4:
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:34:27: error: conflicting declaration 'std::vector<long long int> a'
34 | vector<long long> a;
| ^
gap.cpp:26:36: note: previous declaration as 'int a'
26 | int lstx = 0, lsty = 1e18, a, b;
| ^
gap.cpp:8:12: error: request for member 'push_back' in 'a', which is of non-class type 'int'
8 | #define pb push_back
| ^~~~~~~~~
gap.cpp:35:29: note: in expansion of macro 'pb'
35 | for(auto it : se) a.pb(it);
| ^~
gap.cpp:37:30: error: request for member 'size' in 'a', which is of non-class type 'int'
37 | for(int i = 1; i < a.size(); i++){
| ^~~~
gap.cpp:38:35: error: invalid types 'int[int]' for array subscript
38 | answer = max(answer, a[i] - a[i - 1]);
| ^
gap.cpp:38:42: error: invalid types 'int[int]' for array subscript
38 | answer = max(answer, a[i] - a[i - 1]);
| ^
gap.cpp:44:25: error: invalid conversion from 'long long int' to 'long long int*' [-fpermissive]
44 | MinMax(0, 1e18, mini, maxi);
| ^~~~
| |
| long long int
In file included from gap.cpp:4:
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:44:31: error: invalid conversion from 'long long int' to 'long long int*' [-fpermissive]
44 | MinMax(0, 1e18, mini, maxi);
| ^~~~
| |
| long long int
In file included from gap.cpp:4:
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:49:38: error: invalid conversion from 'long long int' to 'long long int*' [-fpermissive]
49 | MinMax(le, le + gap - 1, temp1, temp2);
| ^~~~~
| |
| long long int
In file included from gap.cpp:4:
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:49:45: error: invalid conversion from 'long long int' to 'long long int*' [-fpermissive]
49 | MinMax(le, le + gap - 1, temp1, temp2);
| ^~~~~
| |
| long long int
In file included from gap.cpp:4:
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:57:34: error: invalid conversion from 'long long int' to 'long long int*' [-fpermissive]
57 | MinMax(le, maxi - 1, temp1, temp2);
| ^~~~~
| |
| long long int
In file included from gap.cpp:4:
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:57:41: error: invalid conversion from 'long long int' to 'long long int*' [-fpermissive]
57 | MinMax(le, maxi - 1, temp1, temp2);
| ^~~~~
| |
| long long int
In file included from gap.cpp:4:
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:58:29: error: continue statement not within a loop
58 | if(temp1 == -1) continue;
| ^~~~~~~~