foo.cc: In function 'int length1(int, int)':
foo.cc:10:8: warning: unused variable 'l1' [-Wunused-variable]
10 | int l1=s;
| ^~
foo.cc: In function 'int length2(int, int)':
foo.cc:25:8: warning: unused variable 'l2' [-Wunused-variable]
25 | int l2=k;
| ^~
foo.cc: In function 'int add(int, int, int, int, std::vector<int>&, std::vector<int>&, int, int)':
foo.cc:37:5: error: 'l' was not declared in this scope
37 | j[l]=x1%l1;
| ^
foo.cc:39:2: error: expected primary-expression before '}' token
39 | }
| ^
foo.cc:44:1: warning: no return statement in function returning non-void [-Wreturn-type]
44 | }
| ^
foo.cc: In function 'int main()':
foo.cc:60:20: error: invalid initialization of reference of type 'std::vector<int>&' from expression of type 'int'
60 | add(x1,n1,x2,n2,j,l1,l2);
| ^~
foo.cc:31:65: note: in passing argument 6 of 'int add(int, int, int, int, std::vector<int>&, std::vector<int>&, int, int)'
31 | int add(int x1,int n1,int x2,int n2,vector<int> &j,vector<int> &k,int l1,int l2)
| ~~~~~~~~~~~~~^
[Hydro](https://hydro.ac)提供评测服务