swap.cpp: In function 'x sube(long long int, long long int)':
swap.cpp:35:55: error: no matching function for call to 'max(long long int&, x&)'
35 | res.mayor = max(res.mayor, lca[i][res.anc]);
| ^
In file included from /usr/include/c++/10/vector:60,
from swap.h:1,
from swap.cpp:1:
/usr/include/c++/10/bits/stl_algobase.h:254:5: note: candidate: 'template<class _Tp> constexpr const _Tp& std::max(const _Tp&, const _Tp&)'
254 | max(const _Tp& __a, const _Tp& __b)
| ^~~
/usr/include/c++/10/bits/stl_algobase.h:254:5: note: template argument deduction/substitution failed:
swap.cpp:35:55: note: deduced conflicting types for parameter 'const _Tp' ('long long int' and 'x')
35 | res.mayor = max(res.mayor, lca[i][res.anc]);
| ^
In file included from /usr/include/c++/10/vector:60,
from swap.h:1,
from swap.cpp:1:
/usr/include/c++/10/bits/stl_algobase.h:300:5: note: candidate: 'template<class _Tp, class _Compare> constexpr const _Tp& std::max(const _Tp&, const _Tp&, _Compare)'
300 | max(const _Tp& __a, const _Tp& __b, _Compare __comp)
| ^~~
/usr/include/c++/10/bits/stl_algobase.h:300:5: note: template argument deduction/substitution failed:
swap.cpp:35:55: note: deduced conflicting types for parameter 'const _Tp' ('long long int' and 'x')
35 | res.mayor = max(res.mayor, lca[i][res.anc]);
| ^
In file included from /usr/include/c++/10/algorithm:62,
from /usr/include/x86_64-linux-gnu/c++/10/bits/stdc++.h:65,
from swap.cpp:2:
/usr/include/c++/10/bits/stl_algo.h:3480:5: note: candidate: 'template<class _Tp> constexpr _Tp std::max(std::initializer_list<_Tp>)'
3480 | max(initializer_list<_Tp> __l)
| ^~~
/usr/include/c++/10/bits/stl_algo.h:3480:5: note: template argument deduction/substitution failed:
swap.cpp:35:55: note: mismatched types 'std::initializer_list<_Tp>' and 'long long int'
35 | res.mayor = max(res.mayor, lca[i][res.anc]);
| ^
In file included from /usr/include/c++/10/algorithm:62,
from /usr/include/x86_64-linux-gnu/c++/10/bits/stdc++.h:65,
from swap.cpp:2:
/usr/include/c++/10/bits/stl_algo.h:3486:5: note: candidate: 'template<class _Tp, class _Compare> constexpr _Tp std::max(std::initializer_list<_Tp>, _Compare)'
3486 | max(initializer_list<_Tp> __l, _Compare __comp)
| ^~~
/usr/include/c++/10/bits/stl_algo.h:3486:5: note: template argument deduction/substitution failed:
swap.cpp:35:55: note: mismatched types 'std::initializer_list<_Tp>' and 'long long int'
35 | res.mayor = max(res.mayor, lca[i][res.anc]);
| ^
swap.cpp:36:51: error: no matching function for call to 'min(long long int&, x&)'
36 | res.seg = min(res.seg, lca[i][res.anc]);
| ^
In file included from /usr/include/c++/10/vector:60,
from swap.h:1,
from swap.cpp:1:
/usr/include/c++/10/bits/stl_algobase.h:230:5: note: candidate: 'template<class _Tp> constexpr const _Tp& std::min(const _Tp&, const _Tp&)'
230 | min(const _Tp& __a, const _Tp& __b)
| ^~~
/usr/include/c++/10/bits/stl_algobase.h:230:5: note: template argument deduction/substitution failed:
swap.cpp:36:51: note: deduced conflicting types for parameter 'const _Tp' ('long long int' and 'x')
36 | res.seg = min(res.seg, lca[i][res.anc]);
| ^
In file included from /usr/include/c++/10/vector:60,
from swap.h:1,
from swap.cpp:1:
/usr/include/c++/10/bits/stl_algobase.h:278:5: note: candidate: 'template<class _Tp, class _Compare> constexpr const _Tp& std::min(const _Tp&, const _Tp&, _Compare)'
278 | min(const _Tp& __a, const _Tp& __b, _Compare __comp)
| ^~~
/usr/include/c++/10/bits/stl_algobase.h:278:5: note: template argument deduction/substitution failed:
swap.cpp:36:51: note: deduced conflicting types for parameter 'const _Tp' ('long long int' and 'x')
36 | res.seg = min(res.seg, lca[i][res.anc]);
| ^
In file included from /usr/include/c++/10/algorithm:62,
from /usr/include/x86_64-linux-gnu/c++/10/bits/stdc++.h:65,
from swap.cpp:2:
/usr/include/c++/10/bits/stl_algo.h:3468:5: note: candidate: 'template<class _Tp> constexpr _Tp std::min(std::initializer_list<_Tp>)'
3468 | min(initializer_list<_Tp> __l)
| ^~~
/usr/include/c++/10/bits/stl_algo.h:3468:5: note: template argument deduction/substitution failed:
swap.cpp:36:51: note: mismatched types 'std::initializer_list<_Tp>' and 'long long int'
36 | res.seg = min(res.seg, lca[i][res.anc]);
| ^
In file included from /usr/include/c++/10/algorithm:62,
from /usr/include/x86_64-linux-gnu/c++/10/bits/stdc++.h:65,
from swap.cpp:2:
/usr/include/c++/10/bits/stl_algo.h:3474:5: note: candidate: 'template<class _Tp, class _Compare> constexpr _Tp std::min(std::initializer_list<_Tp>, _Compare)'
3474 | min(initializer_list<_Tp> __l, _Compare __comp)
| ^~~
/usr/include/c++/10/bits/stl_algo.h:3474:5: note: template argument deduction/substitution failed:
swap.cpp:36:51: note: mismatched types 'std::initializer_list<_Tp>' and 'long long int'
36 | res.seg = min(res.seg, lca[i][res.anc]);
| ^
swap.cpp: In function 'void dfs(long long int, long long int, long long int, long long int)':
swap.cpp:69:26: error: cannot convert 'x' to 'long long int' in assignment
69 | otro = lca[i][pos];
| ~~~~~~~~~~^
| |
| x
swap.cpp: In function 'int getMinimumFuelCapacity(int, int)':
swap.cpp:106:43: error: no matching function for call to 'min(long long int&, x&)'
106 | act.seg = min(act.seg, lca[0][act.anc]);
| ^
In file included from /usr/include/c++/10/vector:60,
from swap.h:1,
from swap.cpp:1:
/usr/include/c++/10/bits/stl_algobase.h:230:5: note: candidate: 'template<class _Tp> constexpr const _Tp& std::min(const _Tp&, const _Tp&)'
230 | min(const _Tp& __a, const _Tp& __b)
| ^~~
/usr/include/c++/10/bits/stl_algobase.h:230:5: note: template argument deduction/substitution failed:
swap.cpp:106:43: note: deduced conflicting types for parameter 'const _Tp' ('long long int' and 'x')
106 | act.seg = min(act.seg, lca[0][act.anc]);
| ^
In file included from /usr/include/c++/10/vector:60,
from swap.h:1,
from swap.cpp:1:
/usr/include/c++/10/bits/stl_algobase.h:278:5: note: candidate: 'template<class _Tp, class _Compare> constexpr const _Tp& std::min(const _Tp&, const _Tp&, _Compare)'
278 | min(const _Tp& __a, const _Tp& __b, _Compare __comp)
| ^~~
/usr/include/c++/10/bits/stl_algobase.h:278:5: note: template argument deduction/substitution failed:
swap.cpp:106:43: note: deduced conflicting types for parameter 'const _Tp' ('long long int' and 'x')
106 | act.seg = min(act.seg, lca[0][act.anc]);
| ^
In file included from /usr/include/c++/10/algorithm:62,
from /usr/include/x86_64-linux-gnu/c++/10/bits/stdc++.h:65,
from swap.cpp:2:
/usr/include/c++/10/bits/stl_algo.h:3468:5: note: candidate: 'template<class _Tp> constexpr _Tp std::min(std::initializer_list<_Tp>)'
3468 | min(initializer_list<_Tp> __l)
| ^~~
/usr/include/c++/10/bits/stl_algo.h:3468:5: note: template argument deduction/substitution failed:
swap.cpp:106:43: note: mismatched types 'std::initializer_list<_Tp>' and 'long long int'
106 | act.seg = min(act.seg, lca[0][act.anc]);
| ^
In file included from /usr/include/c++/10/algorithm:62,
from /usr/include/x86_64-linux-gnu/c++/10/bits/stdc++.h:65,
from swap.cpp:2:
/usr/include/c++/10/bits/stl_algo.h:3474:5: note: candidate: 'template<class _Tp, class _Compare> constexpr _Tp std::min(std::initializer_list<_Tp>, _Compare)'
3474 | min(initializer_list<_Tp> __l, _Compare __comp)
| ^~~
/usr/include/c++/10/bits/stl_algo.h:3474:5: note: template argument deduction/substitution failed:
swap.cpp:106:43: note: mismatched types 'std::initializer_list<_Tp>' and 'long long int'
106 | act.seg = min(act.seg, lca[0][act.anc]);
| ^
swap.cpp:107:43: error: no matching function for call to 'min(long long int&, x&)'
107 | act.seg = min(act.seg, lca[0][act.anc]);
| ^
In file included from /usr/include/c++/10/vector:60,
from swap.h:1,
from swap.cpp:1:
/usr/include/c++/10/bits/stl_algobase.h:230:5: note: candidate: 'template<class _Tp> constexpr const _Tp& std::min(const _Tp&, const _Tp&)'
230 | min(const _Tp& __a, const _Tp& __b)
| ^~~
/usr/include/c++/10/bits/stl_algobase.h:230:5: note: template argument deduction/substitution failed:
swap.cpp:107:43: note: deduced conflicting types for parameter 'const _Tp' ('long long int' and 'x')
107 | act.seg = min(act.seg, lca[0][act.anc]);
| ^
In file included from /usr/include/c++/10/vector:60,
from swap.h:1,
from swap.cpp:1:
/usr/include/c++/10/bits/stl_algobase.h:278:5: note: candidate: 'template<class _Tp, class _Compare> constexpr const _Tp& std::min(const _Tp&, const _Tp&, _Compare)'
278 | min(const _Tp& __a, const _Tp& __b, _Compare __comp)
| ^~~
/usr/include/c++/10/bits/stl_algobase.h:278:5: note: template argument deduction/substitution failed:
swap.cpp:107:43: note: deduced conflicting types for parameter 'const _Tp' ('long long int' and 'x')
107 | act.seg = min(act.seg, lca[0][act.anc]);
| ^
In file included from /usr/include/c++/10/algorithm:62,
from /usr/include/x86_64-linux-gnu/c++/10/bits/stdc++.h:65,
from swap.cpp:2:
/usr/include/c++/10/bits/stl_algo.h:3468:5: note: candidate: 'template<class _Tp> constexpr _Tp std::min(std::initializer_list<_Tp>)'
3468 | min(initializer_list<_Tp> __l)
| ^~~
/usr/include/c++/10/bits/stl_algo.h:3468:5: note: template argument deduction/substitution failed:
swap.cpp:107:43: note: mismatched types 'std::initializer_list<_Tp>' and 'long long int'
107 | act.seg = min(act.seg, lca[0][act.anc]);
| ^
In file included from /usr/include/c++/10/algorithm:62,
from /usr/include/x86_64-linux-gnu/c++/10/bits/stdc++.h:65,
from swap.cpp:2:
/usr/include/c++/10/bits/stl_algo.h:3474:5: note: candidate: 'template<class _Tp, class _Compare> constexpr _Tp std::min(std::initializer_list<_Tp>, _Compare)'
3474 | min(initializer_list<_Tp> __l, _Compare __comp)
| ^~~
/usr/include/c++/10/bits/stl_algo.h:3474:5: note: template argument deduction/substitution failed:
swap.cpp:107:43: note: mismatched types 'std::initializer_list<_Tp>' and 'long long int'
107 | act.seg = min(act.seg, lca[0][act.anc]);
| ^
swap.cpp:109:1: warning: no return statement in function returning non-void [-Wreturn-type]
109 | }
| ^