ricehub.cpp:30:4: error: ambiguating new declaration of 'long long int besthub(int, int, int*, long long int)'
30 | ll besthub(int r, int l,int x[], ll b){
| ^~~~~~~
In file included from ricehub.cpp:1:
ricehub.h:1:5: note: old declaration 'int besthub(int, int, int*, long long int)'
1 | int besthub(int R, int L, int X[], long long B);
| ^~~~~~~
ricehub.cpp: In function 'long long int besthub(int, int, int*, long long int)':
ricehub.cpp:34:17: warning: suggest parentheses around '&&' within '||' [-Wparentheses]
34 | if(lf<i and 2 * i - lf>r or cl(lf, 2 * i - lf, i)>b) lf++;
| ~~~~~^~~~~~~~~~~~~~~~
ricehub.cpp:39:17: warning: suggest parentheses around '&&' within '||' [-Wparentheses]
39 | if(lf<i and 2 * i - lf + 1>r or cs(lf, 2 * i - lf + 1, i)>b) lf++;
| ~~~~~^~~~~~~~~~~~~~~~~~~~
ricehub.cpp: In function 'int main()':
ricehub.cpp:46:28: error: cannot convert 'long long int*' to 'int*'
46 | cout << besthub(5, 20, arr, 6);
| ^~~
| |
| long long int*
In file included from ricehub.cpp:1:
ricehub.h:1:31: note: initializing argument 3 of 'int besthub(int, int, int*, long long int)'
1 | int besthub(int R, int L, int X[], long long B);
| ~~~~^~~