wiring.cpp:6:7: error: expected nested-name-specifier before 'namepsace'
using namepsace std;
^~~~~~~~~
wiring.cpp:12:9: error: 'pair' does not name a type; did you mean 'wait'?
typedef pair<int, int> ii;
^~~~
wait
wiring.cpp:13:1: error: 'vector' does not name a type; did you mean 'wctob'?
vector<int> x;
^~~~~~
wctob
wiring.cpp:14:1: error: 'vector' does not name a type; did you mean 'wctob'?
vector<int> pong;
^~~~~~
wctob
wiring.cpp:15:1: error: 'vector' does not name a type; did you mean 'wctob'?
vector<int> prv;
^~~~~~
wctob
wiring.cpp:16:1: error: 'vector' does not name a type; did you mean 'wctob'?
vector< vector< ll > > pref;
^~~~~~
wctob
wiring.cpp:17:1: error: 'vector' does not name a type; did you mean 'wctob'?
vector< vector< ll > > dp;
^~~~~~
wctob
wiring.cpp:18: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:22:13: warning: comparison between signed and unsigned integer expressions [-Wsign-compare]
while(ir< r.size() && ib< b.size())
~~^~~~~~~~~~
wiring.cpp:22:29: warning: comparison between signed and unsigned integer expressions [-Wsign-compare]
while(ir< r.size() && ib< b.size())
~~^~~~~~~~~~
wiring.cpp:26:13: error: 'x' was not declared in this scope
x.pb(r[ir]); pong.pb(0);
^
wiring.cpp:26:26: error: 'pong' was not declared in this scope
x.pb(r[ir]); pong.pb(0);
^~~~
wiring.cpp:26:26: note: suggested alternative: 'long'
x.pb(r[ir]); pong.pb(0);
^~~~
long
wiring.cpp:31:13: error: 'x' was not declared in this scope
x.pb(b[ib]); pong.pb(1);
^
wiring.cpp:31:26: error: 'pong' was not declared in this scope
x.pb(b[ib]); pong.pb(1);
^~~~
wiring.cpp:31:26: note: suggested alternative: 'long'
x.pb(b[ib]); pong.pb(1);
^~~~
long
wiring.cpp:35:13: warning: comparison between signed and unsigned integer expressions [-Wsign-compare]
while(ir< r.size()) x.pb(r[ir++]), pong.pb(0);
~~^~~~~~~~~~
wiring.cpp:35:25: error: 'x' was not declared in this scope
while(ir< r.size()) x.pb(r[ir++]), pong.pb(0);
^
wiring.cpp:35:40: error: 'pong' was not declared in this scope
while(ir< r.size()) x.pb(r[ir++]), pong.pb(0);
^~~~
wiring.cpp:35:40: note: suggested alternative: 'long'
while(ir< r.size()) x.pb(r[ir++]), pong.pb(0);
^~~~
long
wiring.cpp:36:13: warning: comparison between signed and unsigned integer expressions [-Wsign-compare]
while(ib< b.size()) x.pb(b[ib++]), pong.pb(1);
~~^~~~~~~~~~
wiring.cpp:36:25: error: 'x' was not declared in this scope
while(ib< b.size()) x.pb(b[ib++]), pong.pb(1);
^
wiring.cpp:36:40: error: 'pong' was not declared in this scope
while(ib< b.size()) x.pb(b[ib++]), pong.pb(1);
^~~~
wiring.cpp:36:40: note: suggested alternative: 'long'
while(ib< b.size()) x.pb(b[ib++]), pong.pb(1);
^~~~
long
wiring.cpp:38:13: error: 'pong' was not declared in this scope
int n = pong.size();
^~~~
wiring.cpp:38:13: note: suggested alternative: 'long'
int n = pong.size();
^~~~
long
wiring.cpp:41:46: error: 'x' was not declared in this scope
if(i && pong[i] != pong[i-1]) last = x[i-1];
^
wiring.cpp:42:9: error: 'prv' was not declared in this scope
prv.pb(last);
^~~
wiring.cpp:44:5: error: 'pref' was not declared in this scope
pref.pb(vector<ll>());
^~~~
wiring.cpp:44:5: note: suggested alternative: 'dremf'
pref.pb(vector<ll>());
^~~~
dremf
wiring.cpp:44:13: error: 'vector' was not declared in this scope
pref.pb(vector<ll>());
^~~~~~
wiring.cpp:44: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:44:22: error: expected primary-expression before '>' token
pref.pb(vector<ll>());
^
wiring.cpp:44:24: error: expected primary-expression before ')' token
pref.pb(vector<ll>());
^
wiring.cpp:45:5: error: 'buck' was not declared in this scope
buck.pb(vector<int>());
^~~~
wiring.cpp:45:20: error: expected primary-expression before 'int'
buck.pb(vector<int>());
^~~
wiring.cpp:50:30: error: expected primary-expression before '>' token
pref.pb(vector<ll>());
^
wiring.cpp:50:32: error: expected primary-expression before ')' token
pref.pb(vector<ll>());
^
wiring.cpp:51:28: error: expected primary-expression before 'int'
buck.pb(vector<int>());
^~~
wiring.cpp:53:44: error: 'x' was not declared in this scope
pref.back().pb(pref.back().empty()?x[i]:(pref.back().back()+x[i]) );
^
wiring.cpp:56:5: error: 'dp' was not declared in this scope
dp.resize(pref.size());
^~
wiring.cpp:56:5: note: suggested alternative: 'mp'
dp.resize(pref.size());
^~
mp
wiring.cpp:84: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:84: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:84: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:84: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)
^~~