gift.cpp:5:33: error: expected ',' or '...' before 'a'
5 | int construct(int n,int r,int[] a,int[] b,int[] x){
| ^
gift.cpp: In function 'int construct(int, int, int*)':
gift.cpp:11:12: error: 'x' was not declared in this scope
11 | if(x[i]==1){
| ^
gift.cpp:12:36: error: 'a' was not declared in this scope
12 | auto it=st.lower_bound(a[i]);
| ^
gift.cpp:14:46: error: 'b' was not declared in this scope
14 | st.erase(next(it),st.upper_bound(b[i]));
| ^
gift.cpp:18:12: error: 'x' was not declared in this scope
18 | if(x[i]==2){
| ^
gift.cpp:19:36: error: 'a' was not declared in this scope
19 | auto it=st.lower_bound(a[i]),it2=st.lower_bound(b[i]);
| ^
gift.cpp:21:16: error: 'it2' was not declared in this scope
21 | if(it2==st.end()||*it2>b[i])it2--;
| ^~~
gift.cpp:21:36: error: 'b' was not declared in this scope
21 | if(it2==st.end()||*it2>b[i])it2--;
| ^
gift.cpp:22:20: error: 'it2' was not declared in this scope
22 | if(it==it2)return 0;
| ^~~
gift.cpp:26:51: error: expected ':' before ';' token
26 | for(int i=0,j=0;i<n;i++)j^=v[i],s[i]=j?'R','B';
| ^
| :
gift.cpp:26:51: error: expected primary-expression before ';' token