elephants.cpp: In function 'void Bini(int*, int, int*, int*)':
elephants.cpp:6:11: error: request for member 'second' in '*(xel + ((sizetype)(((long unsigned int)i) * 4)))', which is of non-class type 'int'
#define S second
^
elephants.cpp:13:34: note: in expansion of macro 'S'
for(int i=0;i<xbs;i++)id[xel[i].S]=P(x,i);
^
elephants.cpp:13:39: error: 'x' was not declared in this scope
for(int i=0;i<xbs;i++)id[xel[i].S]=P(x,i);
^
elephants.cpp:5:11: error: request for member 'first' in '*(xel + ((sizetype)(((long unsigned int)i) * 4)))', which is of non-class type 'int'
#define F first
^
elephants.cpp:16:24: note: in expansion of macro 'F'
while(r-1>=0&&xel[i].F+l<xel[r-1].F)r--;
^
elephants.cpp:5:11: error: request for member 'first' in '*(xel + (((sizetype)(((long unsigned int)r) * 4)) + 18446744073709551612))', which is of non-class type 'int'
#define F first
^
elephants.cpp:16:37: note: in expansion of macro 'F'
while(r-1>=0&&xel[i].F+l<xel[r-1].F)r--;
^
elephants.cpp:5:11: error: request for member 'first' in '*(xel + ((sizetype)(((long unsigned int)i) * 4)))', which is of non-class type 'int'
#define F first
^
elephants.cpp:18:18: note: in expansion of macro 'F'
xds[i]=xel[i].F+l;
^
elephants.cpp: In function 'void ALLini()':
elephants.cpp:40:51: error: cannot convert 'P* {aka std::pair<int, int>*}' to 'int*' for argument '1' to 'void Bini(int*, int, int*, int*)'
for(int i=0;i<=k;i++)Bini(el[i],bs[i],ds[i],sz[i]);
^
elephants.cpp: In function 'int update(int, int)':
elephants.cpp:51:30: error: cannot convert 'P* {aka std::pair<int, int>*}' to 'int*' for argument '1' to 'void Bini(int*, int, int*, int*)'
Bini(el[a],bs[a],ds[a],sz[a]);
^
elephants.cpp:54:14: warning: suggest parentheses around '&&' within '||' [-Wparentheses]
while(a+1<=k&&bs[a+1]==0||(bs[a+1]>=1&&el[a+1][0].F<=y)){
~~~~~~^~~~~~~~~~~~
elephants.cpp:60:30: error: cannot convert 'P* {aka std::pair<int, int>*}' to 'int*' for argument '1' to 'void Bini(int*, int, int*, int*)'
Bini(el[a],bs[a],ds[a],sz[a]);
^