wiring.cpp: In function 'long long int cost(std::vector<long long int>, int, std::vector<long long int>)':
wiring.cpp:31:22: warning: comparison between signed and unsigned integer expressions [-Wsign-compare]
for (int i = hed; i < n.size() - 1; i++)
~~^~~~~~~~~~~~~~
wiring.cpp:34:20: warning: comparison between signed and unsigned integer expressions [-Wsign-compare]
for (int i = 1; i < m.size(); i++)
~~^~~~~~~~~~
wiring.cpp: In function 'long long int calc(std::vector<long long int>, std::vector<long long int>)':
wiring.cpp:47:229: error: no matching function for call to 'max(long long unsigned int, long long int)'
while ( opt > 0 && st + min(dp[opt + hd], dp[opt + hd + 1]) > min(dp[opt + hd], dp[opt + hd - 1]) + st + n.back() - n[opt - 1] - max((ll)n.size() - opt, (ll)m.size()) * (m[0] - n.back()) + max(n.size() - opt + 1ll, (ll)m.size()) * (m[0] - n.back()) )
^
In file included from /usr/include/c++/7/vector:60:0,
from wiring.h:1,
from wiring.cpp:1:
/usr/include/c++/7/bits/stl_algobase.h:219:5: note: candidate: template<class _Tp> constexpr const _Tp& std::max(const _Tp&, const _Tp&)
max(const _Tp& __a, const _Tp& __b)
^~~
/usr/include/c++/7/bits/stl_algobase.h:219:5: note: template argument deduction/substitution failed:
wiring.cpp:47:229: note: deduced conflicting types for parameter 'const _Tp' ('long long unsigned int' and 'long long int')
while ( opt > 0 && st + min(dp[opt + hd], dp[opt + hd + 1]) > min(dp[opt + hd], dp[opt + hd - 1]) + st + n.back() - n[opt - 1] - max((ll)n.size() - opt, (ll)m.size()) * (m[0] - n.back()) + max(n.size() - opt + 1ll, (ll)m.size()) * (m[0] - n.back()) )
^
In file included from /usr/include/c++/7/vector:60:0,
from wiring.h:1,
from wiring.cpp:1:
/usr/include/c++/7/bits/stl_algobase.h:265:5: note: candidate: template<class _Tp, class _Compare> constexpr const _Tp& std::max(const _Tp&, const _Tp&, _Compare)
max(const _Tp& __a, const _Tp& __b, _Compare __comp)
^~~
/usr/include/c++/7/bits/stl_algobase.h:265:5: note: template argument deduction/substitution failed:
wiring.cpp:47:229: note: deduced conflicting types for parameter 'const _Tp' ('long long unsigned int' and 'long long int')
while ( opt > 0 && st + min(dp[opt + hd], dp[opt + hd + 1]) > min(dp[opt + hd], dp[opt + hd - 1]) + st + n.back() - n[opt - 1] - max((ll)n.size() - opt, (ll)m.size()) * (m[0] - n.back()) + max(n.size() - opt + 1ll, (ll)m.size()) * (m[0] - n.back()) )
^
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:2:
/usr/include/c++/7/bits/stl_algo.h:3462:5: note: candidate: template<class _Tp> constexpr _Tp std::max(std::initializer_list<_Tp>)
max(initializer_list<_Tp> __l)
^~~
/usr/include/c++/7/bits/stl_algo.h:3462:5: note: template argument deduction/substitution failed:
wiring.cpp:47:229: note: mismatched types 'std::initializer_list<_Tp>' and 'long long unsigned int'
while ( opt > 0 && st + min(dp[opt + hd], dp[opt + hd + 1]) > min(dp[opt + hd], dp[opt + hd - 1]) + st + n.back() - n[opt - 1] - max((ll)n.size() - opt, (ll)m.size()) * (m[0] - n.back()) + max(n.size() - opt + 1ll, (ll)m.size()) * (m[0] - n.back()) )
^
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:2:
/usr/include/c++/7/bits/stl_algo.h:3468:5: note: candidate: template<class _Tp, class _Compare> constexpr _Tp std::max(std::initializer_list<_Tp>, _Compare)
max(initializer_list<_Tp> __l, _Compare __comp)
^~~
/usr/include/c++/7/bits/stl_algo.h:3468:5: note: template argument deduction/substitution failed:
wiring.cpp:47:229: note: mismatched types 'std::initializer_list<_Tp>' and 'long long unsigned int'
while ( opt > 0 && st + min(dp[opt + hd], dp[opt + hd + 1]) > min(dp[opt + hd], dp[opt + hd - 1]) + st + n.back() - n[opt - 1] - max((ll)n.size() - opt, (ll)m.size()) * (m[0] - n.back()) + max(n.size() - opt + 1ll, (ll)m.size()) * (m[0] - n.back()) )
^
wiring.cpp:48:71: error: no matching function for call to 'max(long long unsigned int, long long int)'
opt--, st = n.back() - n[opt - 1] - max(n.size() - opt, (ll)m.size()) * (m[0] - n.back()) + max(n.size() - opt + 1, (ll)m.size()) * (m[0] - n.back());
^
In file included from /usr/include/c++/7/vector:60:0,
from wiring.h:1,
from wiring.cpp:1:
/usr/include/c++/7/bits/stl_algobase.h:219:5: note: candidate: template<class _Tp> constexpr const _Tp& std::max(const _Tp&, const _Tp&)
max(const _Tp& __a, const _Tp& __b)
^~~
/usr/include/c++/7/bits/stl_algobase.h:219:5: note: template argument deduction/substitution failed:
wiring.cpp:48:71: note: deduced conflicting types for parameter 'const _Tp' ('long long unsigned int' and 'long long int')
opt--, st = n.back() - n[opt - 1] - max(n.size() - opt, (ll)m.size()) * (m[0] - n.back()) + max(n.size() - opt + 1, (ll)m.size()) * (m[0] - n.back());
^
In file included from /usr/include/c++/7/vector:60:0,
from wiring.h:1,
from wiring.cpp:1:
/usr/include/c++/7/bits/stl_algobase.h:265:5: note: candidate: template<class _Tp, class _Compare> constexpr const _Tp& std::max(const _Tp&, const _Tp&, _Compare)
max(const _Tp& __a, const _Tp& __b, _Compare __comp)
^~~
/usr/include/c++/7/bits/stl_algobase.h:265:5: note: template argument deduction/substitution failed:
wiring.cpp:48:71: note: deduced conflicting types for parameter 'const _Tp' ('long long unsigned int' and 'long long int')
opt--, st = n.back() - n[opt - 1] - max(n.size() - opt, (ll)m.size()) * (m[0] - n.back()) + max(n.size() - opt + 1, (ll)m.size()) * (m[0] - n.back());
^
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:2:
/usr/include/c++/7/bits/stl_algo.h:3462:5: note: candidate: template<class _Tp> constexpr _Tp std::max(std::initializer_list<_Tp>)
max(initializer_list<_Tp> __l)
^~~
/usr/include/c++/7/bits/stl_algo.h:3462:5: note: template argument deduction/substitution failed:
wiring.cpp:48:71: note: mismatched types 'std::initializer_list<_Tp>' and 'long long unsigned int'
opt--, st = n.back() - n[opt - 1] - max(n.size() - opt, (ll)m.size()) * (m[0] - n.back()) + max(n.size() - opt + 1, (ll)m.size()) * (m[0] - n.back());
^
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:2:
/usr/include/c++/7/bits/stl_algo.h:3468:5: note: candidate: template<class _Tp, class _Compare> constexpr _Tp std::max(std::initializer_list<_Tp>, _Compare)
max(initializer_list<_Tp> __l, _Compare __comp)
^~~
/usr/include/c++/7/bits/stl_algo.h:3468:5: note: template argument deduction/substitution failed:
wiring.cpp:48:71: note: mismatched types 'std::initializer_list<_Tp>' and 'long long unsigned int'
opt--, st = n.back() - n[opt - 1] - max(n.size() - opt, (ll)m.size()) * (m[0] - n.back()) + max(n.size() - opt + 1, (ll)m.size()) * (m[0] - n.back());
^
wiring.cpp:48:131: error: no matching function for call to 'max(long long unsigned int, long long int)'
opt--, st = n.back() - n[opt - 1] - max(n.size() - opt, (ll)m.size()) * (m[0] - n.back()) + max(n.size() - opt + 1, (ll)m.size()) * (m[0] - n.back());
^
In file included from /usr/include/c++/7/vector:60:0,
from wiring.h:1,
from wiring.cpp:1:
/usr/include/c++/7/bits/stl_algobase.h:219:5: note: candidate: template<class _Tp> constexpr const _Tp& std::max(const _Tp&, const _Tp&)
max(const _Tp& __a, const _Tp& __b)
^~~
/usr/include/c++/7/bits/stl_algobase.h:219:5: note: template argument deduction/substitution failed:
wiring.cpp:48:131: note: deduced conflicting types for parameter 'const _Tp' ('long long unsigned int' and 'long long int')
opt--, st = n.back() - n[opt - 1] - max(n.size() - opt, (ll)m.size()) * (m[0] - n.back()) + max(n.size() - opt + 1, (ll)m.size()) * (m[0] - n.back());
^
In file included from /usr/include/c++/7/vector:60:0,
from wiring.h:1,
from wiring.cpp:1:
/usr/include/c++/7/bits/stl_algobase.h:265:5: note: candidate: template<class _Tp, class _Compare> constexpr const _Tp& std::max(const _Tp&, const _Tp&, _Compare)
max(const _Tp& __a, const _Tp& __b, _Compare __comp)
^~~
/usr/include/c++/7/bits/stl_algobase.h:265:5: note: template argument deduction/substitution failed:
wiring.cpp:48:131: note: deduced conflicting types for parameter 'const _Tp' ('long long unsigned int' and 'long long int')
opt--, st = n.back() - n[opt - 1] - max(n.size() - opt, (ll)m.size()) * (m[0] - n.back()) + max(n.size() - opt + 1, (ll)m.size()) * (m[0] - n.back());
^
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:2:
/usr/include/c++/7/bits/stl_algo.h:3462:5: note: candidate: template<class _Tp> constexpr _Tp std::max(std::initializer_list<_Tp>)
max(initializer_list<_Tp> __l)
^~~
/usr/include/c++/7/bits/stl_algo.h:3462:5: note: template argument deduction/substitution failed:
wiring.cpp:48:131: note: mismatched types 'std::initializer_list<_Tp>' and 'long long unsigned int'
opt--, st = n.back() - n[opt - 1] - max(n.size() - opt, (ll)m.size()) * (m[0] - n.back()) + max(n.size() - opt + 1, (ll)m.size()) * (m[0] - n.back());
^
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:2:
/usr/include/c++/7/bits/stl_algo.h:3468:5: note: candidate: template<class _Tp, class _Compare> constexpr _Tp std::max(std::initializer_list<_Tp>, _Compare)
max(initializer_list<_Tp> __l, _Compare __comp)
^~~
/usr/include/c++/7/bits/stl_algo.h:3468:5: note: template argument deduction/substitution failed:
wiring.cpp:48:131: note: mismatched types 'std::initializer_list<_Tp>' and 'long long unsigned int'
opt--, st = n.back() - n[opt - 1] - max(n.size() - opt, (ll)m.size()) * (m[0] - n.back()) + max(n.size() - opt + 1, (ll)m.size()) * (m[0] - n.back());
^
wiring.cpp: In function 'long long int min_total_length(std::vector<int>, std::vector<int>)':
wiring.cpp:56:22: warning: comparison between signed and unsigned integer expressions [-Wsign-compare]
for (int i1 = 1; i1 <= r.size() + b.size(); i1++)
~~~^~~~~~~~~~~~~~~~~~~~~~
wiring.cpp:59:12: warning: comparison between signed and unsigned integer expressions [-Wsign-compare]
while ( i < r.size() || j < b.size() ) {
~~^~~~~~~~~~
wiring.cpp:59:28: warning: comparison between signed and unsigned integer expressions [-Wsign-compare]
while ( i < r.size() || j < b.size() ) {
~~^~~~~~~~~~
wiring.cpp:60:10: warning: comparison between signed and unsigned integer expressions [-Wsign-compare]
if ( i != r.size() && (j == b.size() || r[i] < b[j]) ) {
~~^~~~~~~~~~~
wiring.cpp:60:28: warning: comparison between signed and unsigned integer expressions [-Wsign-compare]
if ( i != r.size() && (j == b.size() || r[i] < b[j]) ) {
~~^~~~~~~~~~~
wiring.cpp:80:54: error: no matching function for call to 'max(long long unsigned int, long long int)'
st = st - max(y.size() - 1ll, (ll)x.size() - opt) * (y[0] - x.back()) + max((ll)y.size(), x.size() - opt) * (y[0] - x.back());
^
In file included from /usr/include/c++/7/vector:60:0,
from wiring.h:1,
from wiring.cpp:1:
/usr/include/c++/7/bits/stl_algobase.h:219:5: note: candidate: template<class _Tp> constexpr const _Tp& std::max(const _Tp&, const _Tp&)
max(const _Tp& __a, const _Tp& __b)
^~~
/usr/include/c++/7/bits/stl_algobase.h:219:5: note: template argument deduction/substitution failed:
wiring.cpp:80:54: note: deduced conflicting types for parameter 'const _Tp' ('long long unsigned int' and 'long long int')
st = st - max(y.size() - 1ll, (ll)x.size() - opt) * (y[0] - x.back()) + max((ll)y.size(), x.size() - opt) * (y[0] - x.back());
^
In file included from /usr/include/c++/7/vector:60:0,
from wiring.h:1,
from wiring.cpp:1:
/usr/include/c++/7/bits/stl_algobase.h:265:5: note: candidate: template<class _Tp, class _Compare> constexpr const _Tp& std::max(const _Tp&, const _Tp&, _Compare)
max(const _Tp& __a, const _Tp& __b, _Compare __comp)
^~~
/usr/include/c++/7/bits/stl_algobase.h:265:5: note: template argument deduction/substitution failed:
wiring.cpp:80:54: note: deduced conflicting types for parameter 'const _Tp' ('long long unsigned int' and 'long long int')
st = st - max(y.size() - 1ll, (ll)x.size() - opt) * (y[0] - x.back()) + max((ll)y.size(), x.size() - opt) * (y[0] - x.back());
^
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:2:
/usr/include/c++/7/bits/stl_algo.h:3462:5: note: candidate: template<class _Tp> constexpr _Tp std::max(std::initializer_list<_Tp>)
max(initializer_list<_Tp> __l)
^~~
/usr/include/c++/7/bits/stl_algo.h:3462:5: note: template argument deduction/substitution failed:
wiring.cpp:80:54: note: mismatched types 'std::initializer_list<_Tp>' and 'long long unsigned int'
st = st - max(y.size() - 1ll, (ll)x.size() - opt) * (y[0] - x.back()) + max((ll)y.size(), x.size() - opt) * (y[0] - x.back());
^
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:2:
/usr/include/c++/7/bits/stl_algo.h:3468:5: note: candidate: template<class _Tp, class _Compare> constexpr _Tp std::max(std::initializer_list<_Tp>, _Compare)
max(initializer_list<_Tp> __l, _Compare __comp)
^~~
/usr/include/c++/7/bits/stl_algo.h:3468:5: note: template argument deduction/substitution failed:
wiring.cpp:80:54: note: mismatched types 'std::initializer_list<_Tp>' and 'long long unsigned int'
st = st - max(y.size() - 1ll, (ll)x.size() - opt) * (y[0] - x.back()) + max((ll)y.size(), x.size() - opt) * (y[0] - x.back());
^
wiring.cpp:80:110: error: no matching function for call to 'max(long long int, long long unsigned int)'
st = st - max(y.size() - 1ll, (ll)x.size() - opt) * (y[0] - x.back()) + max((ll)y.size(), x.size() - opt) * (y[0] - x.back());
^
In file included from /usr/include/c++/7/vector:60:0,
from wiring.h:1,
from wiring.cpp:1:
/usr/include/c++/7/bits/stl_algobase.h:219:5: note: candidate: template<class _Tp> constexpr const _Tp& std::max(const _Tp&, const _Tp&)
max(const _Tp& __a, const _Tp& __b)
^~~
/usr/include/c++/7/bits/stl_algobase.h:219:5: note: template argument deduction/substitution failed:
wiring.cpp:80:110: note: deduced conflicting types for parameter 'const _Tp' ('long long int' and 'long long unsigned int')
st = st - max(y.size() - 1ll, (ll)x.size() - opt) * (y[0] - x.back()) + max((ll)y.size(), x.size() - opt) * (y[0] - x.back());
^
In file included from /usr/include/c++/7/vector:60:0,
from wiring.h:1,
from wiring.cpp:1:
/usr/include/