horses.cpp: In function 'll bp(ll, ll)':
horses.cpp:43:10: warning: declaration of 'n' shadows a global declaration [-Wshadow]
43 | ll bp(ll n,ll m){
| ~~~^
horses.cpp:39:4: note: shadowed declaration is here
39 | ll n , x[N] , y[N];
| ^
horses.cpp: In function 'll calc()':
horses.cpp:75:11: warning: conversion from 'long long int' to 'int' may change value [-Wconversion]
75 | int i = *it;
| ^~~
horses.cpp:76:11: warning: conversion from 'long long int' to 'int' may change value [-Wconversion]
76 | int j = *(++it);
| ^~~~~~~
horses.cpp:80:35: warning: conversion from 'll' {aka 'long long int'} to 'int' may change value [-Wconversion]
80 | mx = max(mx, res * S.get(1, 0, n-1, i, j-1));
| ~^~
horses.cpp: At global scope:
horses.cpp:88:4: error: ambiguating new declaration of 'll init(int, int*, int*)'
88 | ll init(int nn, int X[], int Y[]) {
| ^~~~
In file included from horses.cpp:8:
horses.h:4:5: note: old declaration 'int init(int, int*, int*)'
4 | int init(int N, int X[], int Y[]);
| ^~~~
horses.cpp: In function 'll init(int, int*, int*)':
horses.cpp:95:20: warning: conversion from 'll' {aka 'long long int'} to 'int' may change value [-Wconversion]
95 | S.update(1, 0, n - 1, i, y[i]);
| ~~^~~
horses.cpp:99:13: warning: conversion from 'll' {aka 'long long int'} to 'int' may change value [-Wconversion]
99 | for(int i=n-1;i>=0;i--) {
| ~^~
horses.cpp: In function 'int updateX(int, int)':
horses.cpp:119:13: warning: conversion from 'll' {aka 'long long int'} to 'int' may change value [-Wconversion]
119 | return calc();
| ~~~~^~
horses.cpp: In function 'int updateY(int, int)':
horses.cpp:123:18: warning: conversion from 'll' {aka 'long long int'} to 'int' may change value [-Wconversion]
123 | S.update(1, 0, n-1, pos, val);
| ~^~
horses.cpp:124:13: warning: conversion from 'll' {aka 'long long int'} to 'int' may change value [-Wconversion]
124 | return calc();
| ~~~~^~