pyramids.cpp:11:1: error: expected declaration before '}' token
11 | }
| ^
pyramids.cpp: In function 'bool can_transform(int, int, int, int)':
pyramids.cpp:16:30: error: 'A' was not declared in this scope
16 | int sum=std::accumulate(A.begin()+L,A.begin()+R,0);
| ^
pyramids.cpp:17:30: error: 'B' was not declared in this scope
17 | int sum2=std::accumulate(B.begin()+X,B.begin()+y,0);
| ^
pyramids.cpp:17:52: error: 'y' was not declared in this scope
17 | int sum2=std::accumulate(B.begin()+X,B.begin()+y,0);
| ^
pyramids.cpp:21:13: error: 'sum1' was not declared in this scope; did you mean 'sum2'?
21 | else if(sum1==sum2){
| ^~~~
| sum2
pyramids.cpp:23:21: error: 'n' was not declared in this scope
23 | for(int i=0;i<n; i++){
| ^
pyramids.cpp:31:10: error: 'd' was not declared in this scope
31 | if(d>1){
| ^
pyramids.cpp:38:1: warning: control reaches end of non-void function [-Wreturn-type]
38 | }
| ^