wiring.cpp: In function 'int min_total_length(std::vector<int>, std::vector<int>)':
wiring.cpp:10:19: warning: comparison of integer expressions of different signedness: 'int' and 'std::vector<int>::size_type' {aka 'long unsigned int'} [-Wsign-compare]
10 | for(int i =0; i<r.size(); i++){
| ~^~~~~~~~~
wiring.cpp:11:18: error: 'a' was not declared in this scope
11 | ans+= b[i] - a[i];
| ^
wiring.cpp:14:28: warning: comparison of integer expressions of different signedness: 'int' and 'std::vector<int>::size_type' {aka 'long unsigned int'} [-Wsign-compare]
14 | for(int i = r.size(); i < b.size(); i++)
| ~~^~~~~~~~~~
wiring.cpp:15:18: error: 'a' was not declared in this scope
15 | ans+= b[i] - a[r.size()-1];
| ^
wiring.cpp:19:19: warning: comparison of integer expressions of different signedness: 'int' and 'std::vector<int>::size_type' {aka 'long unsigned int'} [-Wsign-compare]
19 | for(int i =0; i<b.size(); i++){
| ~^~~~~~~~~
wiring.cpp:20:18: error: 'a' was not declared in this scope
20 | ans+= b[i] - a[i];
| ^
wiring.cpp:23:28: warning: comparison of integer expressions of different signedness: 'int' and 'std::vector<int>::size_type' {aka 'long unsigned int'} [-Wsign-compare]
23 | for(int i = b.size(); i < r.size(); i++)
| ~~^~~~~~~~~~
wiring.cpp:24:18: error: 'a' was not declared in this scope
24 | ans+= b[0] - a[i];
| ^
wiring.cpp:8:6: warning: unused variable 'ind' [-Wunused-variable]
8 | int ind = 0;
| ^~~