wiring.cpp:11:9: error: 'pair' does not name a type; did you mean 'wait'?
typedef pair<int, int> ii;
^~~~
wait
wiring.cpp:12:1: error: 'vector' does not name a type; did you mean 'wctob'?
vector<int> x;
^~~~~~
wctob
wiring.cpp:13:1: error: 'vector' does not name a type; did you mean 'wctob'?
vector<int> pong;
^~~~~~
wctob
wiring.cpp:14:1: error: 'vector' does not name a type; did you mean 'wctob'?
vector<int> prv;
^~~~~~
wctob
wiring.cpp:15:1: error: 'vector' does not name a type; did you mean 'wctob'?
vector< vector< ll > > pref;
^~~~~~
wctob
wiring.cpp:16:1: error: 'vector' does not name a type; did you mean 'wctob'?
vector< vector< ll > > dp;
^~~~~~
wctob
wiring.cpp:17:1: error: 'vector' does not name a type; did you mean 'wctob'?
vector< vector<int> > buck;
^~~~~~
wctob
wiring.cpp: In function 'long long int min_total_length(std::vector<int>, std::vector<int>)':
wiring.cpp:21:13: warning: comparison between signed and unsigned integer expressions [-Wsign-compare]
while(ir< r.size() && ib< b.size())
~~^~~~~~~~~~
wiring.cpp:21:29: warning: comparison between signed and unsigned integer expressions [-Wsign-compare]
while(ir< r.size() && ib< b.size())
~~^~~~~~~~~~
wiring.cpp:25:13: error: 'x' was not declared in this scope
x.pb(r[ir]); pong.pb(0);
^
wiring.cpp:25:26: error: 'pong' was not declared in this scope
x.pb(r[ir]); pong.pb(0);
^~~~
wiring.cpp:25:26: note: suggested alternative: 'long'
x.pb(r[ir]); pong.pb(0);
^~~~
long
wiring.cpp:30:13: error: 'x' was not declared in this scope
x.pb(b[ib]); pong.pb(1);
^
wiring.cpp:30:26: error: 'pong' was not declared in this scope
x.pb(b[ib]); pong.pb(1);
^~~~
wiring.cpp:30:26: note: suggested alternative: 'long'
x.pb(b[ib]); pong.pb(1);
^~~~
long
wiring.cpp:34:13: warning: comparison between signed and unsigned integer expressions [-Wsign-compare]
while(ir< r.size()) x.pb(r[ir++]), pong.pb(0);
~~^~~~~~~~~~
wiring.cpp:34:25: error: 'x' was not declared in this scope
while(ir< r.size()) x.pb(r[ir++]), pong.pb(0);
^
wiring.cpp:34:40: error: 'pong' was not declared in this scope
while(ir< r.size()) x.pb(r[ir++]), pong.pb(0);
^~~~
wiring.cpp:34:40: note: suggested alternative: 'long'
while(ir< r.size()) x.pb(r[ir++]), pong.pb(0);
^~~~
long
wiring.cpp:35:13: warning: comparison between signed and unsigned integer expressions [-Wsign-compare]
while(ib< b.size()) x.pb(b[ib++]), pong.pb(1);
~~^~~~~~~~~~
wiring.cpp:35:25: error: 'x' was not declared in this scope
while(ib< b.size()) x.pb(b[ib++]), pong.pb(1);
^
wiring.cpp:35:40: error: 'pong' was not declared in this scope
while(ib< b.size()) x.pb(b[ib++]), pong.pb(1);
^~~~
wiring.cpp:35:40: note: suggested alternative: 'long'
while(ib< b.size()) x.pb(b[ib++]), pong.pb(1);
^~~~
long
wiring.cpp:37:13: error: 'pong' was not declared in this scope
int n = pong.size();
^~~~
wiring.cpp:37:13: note: suggested alternative: 'long'
int n = pong.size();
^~~~
long
wiring.cpp:40:46: error: 'x' was not declared in this scope
if(i && pong[i] != pong[i-1]) last = x[i-1];
^
wiring.cpp:41:9: error: 'prv' was not declared in this scope
prv.pb(last);
^~~
wiring.cpp:43:5: error: 'pref' was not declared in this scope
pref.pb(vector<ll>());
^~~~
wiring.cpp:43:5: note: suggested alternative: 'dremf'
pref.pb(vector<ll>());
^~~~
dremf
wiring.cpp:43:13: error: 'vector' was not declared in this scope
pref.pb(vector<ll>());
^~~~~~
wiring.cpp:43:13: note: suggested alternative:
In file included from /usr/include/c++/7/vector:64:0,
from wiring.h:1,
from wiring.cpp:4:
/usr/include/c++/7/bits/stl_vector.h:216:11: note: 'std::vector'
class vector : protected _Vector_base<_Tp, _Alloc>
^~~~~~
wiring.cpp:43:22: error: expected primary-expression before '>' token
pref.pb(vector<ll>());
^
wiring.cpp:43:24: error: expected primary-expression before ')' token
pref.pb(vector<ll>());
^
wiring.cpp:44:5: error: 'buck' was not declared in this scope
buck.pb(vector<int>());
^~~~
wiring.cpp:44:20: error: expected primary-expression before 'int'
buck.pb(vector<int>());
^~~
wiring.cpp:49:30: error: expected primary-expression before '>' token
pref.pb(vector<ll>());
^
wiring.cpp:49:32: error: expected primary-expression before ')' token
pref.pb(vector<ll>());
^
wiring.cpp:50:28: error: expected primary-expression before 'int'
buck.pb(vector<int>());
^~~
wiring.cpp:52:44: error: 'x' was not declared in this scope
pref.back().pb(pref.back().empty()?x[i]:(pref.back().back()+x[i]) );
^
wiring.cpp:55:5: error: 'dp' was not declared in this scope
dp.resize(pref.size());
^~
wiring.cpp:55:5: note: suggested alternative: 'mp'
dp.resize(pref.size());
^~
mp
wiring.cpp:83:47: error: 'min' was not declared in this scope
dp[i][j] = min(i+1< comps?dp[i+1][min(numleft, (int)pref[i+1].size())]+sumnext-sumhere:(ll)1e18, dp[i][j+1]+buck[i][j]-prev);
^~~
wiring.cpp:83:47: note: suggested alternative:
In file included from /usr/include/c++/7/algorithm:62:0,
from /usr/include/x86_64-linux-gnu/c++/7/bits/stdc++.h:65,
from wiring.cpp:5:
/usr/include/c++/7/bits/stl_algo.h:3456:5: note: 'std::min'
min(initializer_list<_Tp> __l, _Compare __comp)
^~~
wiring.cpp:83:24: error: 'min' was not declared in this scope
dp[i][j] = min(i+1< comps?dp[i+1][min(numleft, (int)pref[i+1].size())]+sumnext-sumhere:(ll)1e18, dp[i][j+1]+buck[i][j]-prev);
^~~
wiring.cpp:83:24: note: suggested alternative:
In file included from /usr/include/c++/7/algorithm:62:0,
from /usr/include/x86_64-linux-gnu/c++/7/bits/stdc++.h:65,
from wiring.cpp:5:
/usr/include/c++/7/bits/stl_algo.h:3456:5: note: 'std::min'
min(initializer_list<_Tp> __l, _Compare __comp)
^~~