factories.cpp:34:36: error: 'll' has not been declared
void dfs(int v, int p, int center, ll dist = 0) {
^~
factories.cpp: In function 'void dfs(long long int, long long int, long long int, int)':
factories.cpp:37:19: warning: comparison between signed and unsigned integer expressions [-Wsign-compare]
for(int i = 0; i < g[v].size(); ++i) {
~~^~~~~~~~~~~~~
factories.cpp:39:3: error: 'll' was not declared in this scope
ll len = d[v][i];
^~
factories.cpp:41:30: error: 'len' was not declared in this scope
dfs(to, v, center, dist + len);
^~~
factories.cpp:41:30: note: suggested alternative: 'mblen'
dfs(to, v, center, dist + len);
^~~
mblen
factories.cpp: In function 'long long int Query(long long int, long long int*, long long int, long long int*)':
factories.cpp:68:2: error: 'll' was not declared in this scope
ll ans = inf;
^~
factories.cpp:71:20: warning: comparison between signed and unsigned integer expressions [-Wsign-compare]
for(int j = 0; j < pCentroid[Y[i]].size(); ++j)
~~^~~~~~~~~~~~~~~~~~~~~~~~
factories.cpp:76:20: warning: comparison between signed and unsigned integer expressions [-Wsign-compare]
for(int j = 0; j < pCentroid[X[i]].size(); ++j)
~~^~~~~~~~~~~~~~~~~~~~~~~~
factories.cpp:80:20: warning: comparison between signed and unsigned integer expressions [-Wsign-compare]
for(int j = 0; j < pCentroid[X[i]].size(); ++j) {
~~^~~~~~~~~~~~~~~~~~~~~~~~
factories.cpp:82:7: error: expected ';' before 'd'
ll d = dCentroid[X[i]][j];
^
factories.cpp:83:28: error: no matching function for call to 'min(long long int&, std::vector<long long int> [500015])'
minn[s] = min(minn[s], d);
^
In file included from /usr/include/c++/7/bits/char_traits.h:39:0,
from /usr/include/c++/7/ios:40,
from /usr/include/c++/7/istream:38,
from /usr/include/c++/7/sstream:38,
from /usr/include/c++/7/complex:45,
from /usr/include/c++/7/ccomplex:39,
from /usr/include/x86_64-linux-gnu/c++/7/bits/stdc++.h:52,
from factories.cpp:2:
/usr/include/c++/7/bits/stl_algobase.h:195:5: note: candidate: template<class _Tp> constexpr const _Tp& std::min(const _Tp&, const _Tp&)
min(const _Tp& __a, const _Tp& __b)
^~~
/usr/include/c++/7/bits/stl_algobase.h:195:5: note: template argument deduction/substitution failed:
factories.cpp:83:28: note: deduced conflicting types for parameter 'const _Tp' ('long long int' and 'std::vector<long long int> [500015]')
minn[s] = min(minn[s], d);
^
In file included from /usr/include/c++/7/bits/char_traits.h:39:0,
from /usr/include/c++/7/ios:40,
from /usr/include/c++/7/istream:38,
from /usr/include/c++/7/sstream:38,
from /usr/include/c++/7/complex:45,
from /usr/include/c++/7/ccomplex:39,
from /usr/include/x86_64-linux-gnu/c++/7/bits/stdc++.h:52,
from factories.cpp:2:
/usr/include/c++/7/bits/stl_algobase.h:243:5: note: candidate: template<class _Tp, class _Compare> constexpr const _Tp& std::min(const _Tp&, const _Tp&, _Compare)
min(const _Tp& __a, const _Tp& __b, _Compare __comp)
^~~
/usr/include/c++/7/bits/stl_algobase.h:243:5: note: template argument deduction/substitution failed:
factories.cpp:83:28: note: deduced conflicting types for parameter 'const _Tp' ('long long int' and 'std::vector<long long int> [500015]')
minn[s] = min(minn[s], d);
^
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 factories.cpp:2:
/usr/include/c++/7/bits/stl_algo.h:3450:5: note: candidate: template<class _Tp> constexpr _Tp std::min(std::initializer_list<_Tp>)
min(initializer_list<_Tp> __l)
^~~
/usr/include/c++/7/bits/stl_algo.h:3450:5: note: template argument deduction/substitution failed:
factories.cpp:83:28: note: mismatched types 'std::initializer_list<_Tp>' and 'long long int'
minn[s] = min(minn[s], d);
^
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 factories.cpp:2:
/usr/include/c++/7/bits/stl_algo.h:3456:5: note: candidate: template<class _Tp, class _Compare> constexpr _Tp std::min(std::initializer_list<_Tp>, _Compare)
min(initializer_list<_Tp> __l, _Compare __comp)
^~~
/usr/include/c++/7/bits/stl_algo.h:3456:5: note: template argument deduction/substitution failed:
factories.cpp:83:28: note: mismatched types 'std::initializer_list<_Tp>' and 'long long int'
minn[s] = min(minn[s], d);
^
factories.cpp:86:20: warning: comparison between signed and unsigned integer expressions [-Wsign-compare]
for(int j = 0; j < pCentroid[Y[i]].size(); ++j) {
~~^~~~~~~~~~~~~~~~~~~~~~~~
factories.cpp:88:7: error: expected ';' before 'd'
ll d = dCentroid[Y[i]][j];
^
factories.cpp:89:4: error: 'ans' was not declared in this scope
ans = min(ans, minn[s] + d);
^~~
factories.cpp:89:4: note: suggested alternative: 'abs'
ans = min(ans, minn[s] + d);
^~~
abs
factories.cpp:91:9: error: 'ans' was not declared in this scope
return ans;
^~~
factories.cpp:91:9: note: suggested alternative: 'abs'
return ans;
^~~
abs