wiring.cpp: In function 'long long int min_total_length(std::vector<int>, std::vector<int>)':
wiring.cpp:16:12: error: declaration of 'long long int r' shadows a parameter
16 | long long r = INT_MIN, b = INT_MIN, ans = 0, s = 0;
| ^
wiring.cpp:7:40: note: 'std::vector<int> r' previously declared here
7 | long long min_total_length(vector<int> r, vector<int> b) {
| ~~~~~~~~~~~~^
wiring.cpp:16:25: error: declaration of 'long long int b' shadows a parameter
16 | long long r = INT_MIN, b = INT_MIN, ans = 0, s = 0;
| ^
wiring.cpp:7:55: note: 'std::vector<int> b' previously declared here
7 | long long min_total_length(vector<int> r, vector<int> b) {
| ~~~~~~~~~~~~^
wiring.cpp:17:14: error: 'll' was not declared in this scope
17 | vector<pair<ll, ll>> lst(n + m + 1, {INT_MAX, INT_MAX});
| ^~
wiring.cpp:17:18: error: template argument 1 is invalid
17 | vector<pair<ll, ll>> lst(n + m + 1, {INT_MAX, INT_MAX});
| ^~
wiring.cpp:17:20: error: template argument 1 is invalid
17 | vector<pair<ll, ll>> lst(n + m + 1, {INT_MAX, INT_MAX});
| ^~
wiring.cpp:17:20: error: template argument 2 is invalid
wiring.cpp:17:56: error: expression list treated as compound expression in initializer [-fpermissive]
17 | vector<pair<ll, ll>> lst(n + m + 1, {INT_MAX, INT_MAX});
| ^
wiring.cpp:17:33: warning: left operand of comma operator has no effect [-Wunused-value]
17 | vector<pair<ll, ll>> lst(n + m + 1, {INT_MAX, INT_MAX});
| ~~~~~~^~~
wiring.cpp:17:56: error: cannot convert '<brace-enclosed initializer list>' to 'int' in initialization
17 | vector<pair<ll, ll>> lst(n + m + 1, {INT_MAX, INT_MAX});
| ^
wiring.cpp:18:5: error: invalid types 'int[int]' for array subscript
18 | lst[m] = {0, 0};
| ^
wiring.cpp:21:5: error: expected ';' before 'temp'
21 | ll temp = 0;
| ^~~~~
| ;
wiring.cpp:22:6: error: 'struct std::pair<int, int>' has no member named 'se'
22 | (i.se == 1?r : b).pop_back();
| ^~
wiring.cpp:23:10: error: 'struct std::pair<int, int>' has no member named 'se'
23 | x += i.se;
| ^~
wiring.cpp:24:17: error: 'struct std::pair<int, int>' has no member named 'se'
24 | s += i.fi * i.se;
| ^~
wiring.cpp:25:9: error: 'struct std::pair<int, int>' has no member named 'se'
25 | if (i.se == 1) {
| ^~
wiring.cpp:27:4: error: 'temp' was not declared in this scope
27 | temp = ans + i.fi - b;
| ^~~~
wiring.cpp:28:10: error: request for member 'size' in 'b', which is of non-class type 'long long int'
28 | if (b.size()) temp = min(temp, ans + b.back() - i.fi);
| ^~~~
wiring.cpp:28:43: error: request for member 'back' in 'b', which is of non-class type 'long long int'
28 | if (b.size()) temp = min(temp, ans + b.back() - i.fi);
| ^~~~
wiring.cpp:30:9: error: 'struct std::pair<int, int>' has no member named 'se'
30 | if (i.se == -1) {
| ^~
wiring.cpp:32:4: error: 'temp' was not declared in this scope
32 | temp = ans+i.fi-r;
| ^~~~
wiring.cpp:33:10: error: request for member 'size' in 'r', which is of non-class type 'long long int'
33 | if (r.size()) temp = min(temp, ans + r.back()-i.fi);
| ^~~~
wiring.cpp:33:43: error: request for member 'back' in 'r', which is of non-class type 'long long int'
33 | if (r.size()) temp = min(temp, ans + r.back()-i.fi);
| ^~~~
wiring.cpp:35:11: error: 'temp' was not declared in this scope
35 | ans=min(temp, lst[x].fi + abs(lst[x].se - s));
| ^~~~
wiring.cpp:35:20: error: invalid types 'int[int]' for array subscript
35 | ans=min(temp, lst[x].fi + abs(lst[x].se - s));
| ^
wiring.cpp:35:36: error: invalid types 'int[int]' for array subscript
35 | ans=min(temp, lst[x].fi + abs(lst[x].se - s));
| ^
wiring.cpp:36:6: error: invalid types 'int[int]' for array subscript
36 | lst[x] = {ans, s};
| ^