towers.cpp: In function 'void initNoeudArbre(int)':
towers.cpp:34:7: error: 'iNoeud' was not declared in this scope; did you mean 'iNoeuds'?
34 | if (iNoeud < NB_TOURS_MAX)
| ^~~~~~
| iNoeuds
towers.cpp:38:23: error: 'max' was not declared in this scope; did you mean 'std::max'?
38 | segtree[iNoeud] = max(segtree[iNoeud*2], segtree[iNoeud*2+1]);
| ^~~
| std::max
In file included from /usr/include/c++/10/vector:60,
from towers.h:1,
from towers.cpp:1:
/usr/include/c++/10/bits/stl_algobase.h:300:5: note: 'std::max' declared here
300 | max(const _Tp& __a, const _Tp& __b, _Compare __comp)
| ^~~
towers.cpp: In function 'int maxSurInter(int, int, int, int, int)':
towers.cpp:69:10: error: 'max' was not declared in this scope; did you mean 'std::max'?
69 | return max(maxSurInter(debut, milieu, debutVoulu, finVoulue, iNoeud*2),
| ^~~
| std::max
In file included from /usr/include/c++/10/vector:60,
from towers.h:1,
from towers.cpp:1:
/usr/include/c++/10/bits/stl_algobase.h:300:5: note: 'std::max' declared here
300 | max(const _Tp& __a, const _Tp& __b, _Compare __comp)
| ^~~
towers.cpp: In function 'void init(int, std::vector<int>)':
towers.cpp:85:3: error: 'sort' was not declared in this scope; did you mean 'short'?
85 | sort(hauteursTriees, hauteursTriees+N);
| ^~~~
| short
towers.cpp: In function 'int max_towers(int, int, int)':
towers.cpp:91:18: error: 'class std::set<TourTrieeIndex>' has no member named 'push'
91 | toursUtilisees.push({hauteursTriees[0].hauteur, hauteursTriees[0].index});
| ^~~~
towers.cpp:94:59: error: conversion from 'Tour' to non-scalar type 'TourTrieeIndex' requested
94 | TourTrieeIndex aAjouter = hauteursTriees[iTourAAjouter];
| ~~~~~~~~~~~~~~~~~~~~~~~~~~~~^
towers.cpp:97:63: error: no match for 'operator+' (operand types are 'std::set<TourTrieeIndex>::iterator' {aka 'std::_Rb_tree<TourTrieeIndex, TourTrieeIndex, std::_Identity<TourTrieeIndex>, std::less<TourTrieeIndex>, std::allocator<TourTrieeIndex> >::const_iterator'} and 'int')
97 | auto borneDessus = toursUtilisees.lower_bound(aAjouter) + 1;
| ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ ^ ~
| | |
| | int
| std::set<TourTrieeIndex>::iterator {aka std::_Rb_tree<TourTrieeIndex, TourTrieeIndex, std::_Identity<TourTrieeIndex>, std::less<TourTrieeIndex>, std::allocator<TourTrieeIndex> >::const_iterator}
In file included from /usr/include/c++/10/bits/stl_algobase.h:67,
from /usr/include/c++/10/vector:60,
from towers.h:1,
from towers.cpp:1:
/usr/include/c++/10/bits/stl_iterator.h:508:5: note: candidate: 'template<class _Iterator> constexpr std::reverse_iterator<_Iterator> std::operator+(typename std::reverse_iterator<_Iterator>::difference_type, const std::reverse_iterator<_Iterator>&)'
508 | operator+(typename reverse_iterator<_Iterator>::difference_type __n,
| ^~~~~~~~
/usr/include/c++/10/bits/stl_iterator.h:508:5: note: template argument deduction/substitution failed:
towers.cpp:97:65: note: mismatched types 'const std::reverse_iterator<_Iterator>' and 'int'
97 | auto borneDessus = toursUtilisees.lower_bound(aAjouter) + 1;
| ^
In file included from /usr/include/c++/10/bits/stl_algobase.h:67,
from /usr/include/c++/10/vector:60,
from towers.h:1,
from towers.cpp:1:
/usr/include/c++/10/bits/stl_iterator.h:1540:5: note: candidate: 'template<class _Iterator> constexpr std::move_iterator<_IteratorL> std::operator+(typename std::move_iterator<_IteratorL>::difference_type, const std::move_iterator<_IteratorL>&)'
1540 | operator+(typename move_iterator<_Iterator>::difference_type __n,
| ^~~~~~~~
/usr/include/c++/10/bits/stl_iterator.h:1540:5: note: template argument deduction/substitution failed:
towers.cpp:97:65: note: mismatched types 'const std::move_iterator<_IteratorL>' and 'int'
97 | auto borneDessus = toursUtilisees.lower_bound(aAjouter) + 1;
| ^
towers.cpp:129:24: error: 'class std::set<TourTrieeIndex>' has no member named 'push'
129 | toursUtilisees.push(aAjouter);
| ^~~~
In file included from /usr/include/c++/10/bits/stl_tree.h:65,
from /usr/include/c++/10/set:60,
from towers.cpp:2:
/usr/include/c++/10/bits/stl_function.h: In instantiation of 'constexpr bool std::less<_Tp>::operator()(const _Tp&, const _Tp&) const [with _Tp = TourTrieeIndex]':
/usr/include/c++/10/bits/stl_tree.h:1935:29: required from 'std::_Rb_tree<_Key, _Val, _KeyOfValue, _Compare, _Alloc>::iterator std::_Rb_tree<_Key, _Val, _KeyOfValue, _Compare, _Alloc>::_M_lower_bound(std::_Rb_tree<_Key, _Val, _KeyOfValue, _Compare, _Alloc>::_Link_type, std::_Rb_tree<_Key, _Val, _KeyOfValue, _Compare, _Alloc>::_Base_ptr, const _Key&) [with _Key = TourTrieeIndex; _Val = TourTrieeIndex; _KeyOfValue = std::_Identity<TourTrieeIndex>; _Compare = std::less<TourTrieeIndex>; _Alloc = std::allocator<TourTrieeIndex>; std::_Rb_tree<_Key, _Val, _KeyOfValue, _Compare, _Alloc>::iterator = std::_Rb_tree<TourTrieeIndex, TourTrieeIndex, std::_Identity<TourTrieeIndex>, std::less<TourTrieeIndex>, std::allocator<TourTrieeIndex> >::iterator; std::_Rb_tree<_Key, _Val, _KeyOfValue, _Compare, _Alloc>::_Link_type = std::_Rb_tree_node<TourTrieeIndex>*; std::_Rb_tree<_Key, _Val, _KeyOfValue, _Compare, _Alloc>::_Base_ptr = std::_Rb_tree_node_base*]'
/usr/include/c++/10/bits/stl_tree.h:1277:30: required from 'std::_Rb_tree<_Key, _Val, _KeyOfValue, _Compare, _Alloc>::iterator std::_Rb_tree<_Key, _Val, _KeyOfValue, _Compare, _Alloc>::lower_bound(const key_type&) [with _Key = TourTrieeIndex; _Val = TourTrieeIndex; _KeyOfValue = std::_Identity<TourTrieeIndex>; _Compare = std::less<TourTrieeIndex>; _Alloc = std::allocator<TourTrieeIndex>; std::_Rb_tree<_Key, _Val, _KeyOfValue, _Compare, _Alloc>::iterator = std::_Rb_tree<TourTrieeIndex, TourTrieeIndex, std::_Identity<TourTrieeIndex>, std::less<TourTrieeIndex>, std::allocator<TourTrieeIndex> >::iterator; std::_Rb_tree<_Key, _Val, _KeyOfValue, _Compare, _Alloc>::key_type = TourTrieeIndex]'
/usr/include/c++/10/bits/stl_set.h:830:32: required from 'std::set<_Key, _Compare, _Alloc>::iterator std::set<_Key, _Compare, _Alloc>::lower_bound(const key_type&) [with _Key = TourTrieeIndex; _Compare = std::less<TourTrieeIndex>; _Alloc = std::allocator<TourTrieeIndex>; std::set<_Key, _Compare, _Alloc>::iterator = std::_Rb_tree<TourTrieeIndex, TourTrieeIndex, std::_Identity<TourTrieeIndex>, std::less<TourTrieeIndex>, std::allocator<TourTrieeIndex> >::const_iterator; std::set<_Key, _Compare, _Alloc>::key_type = TourTrieeIndex]'
towers.cpp:97:61: required from here
/usr/include/c++/10/bits/stl_function.h:386:20: error: no match for 'operator<' (operand types are 'const TourTrieeIndex' and 'const TourTrieeIndex')
386 | { return __x < __y; }
| ~~~~^~~~~
towers.cpp:20:8: note: candidate: 'bool TourTrieeIndex::operator<(const TourTrieeIndex&)' (near match)
20 | bool operator<(const TourTrieeIndex &autre)
| ^~~~~~~~
towers.cpp:20:8: note: passing 'const TourTrieeIndex*' as 'this' argument discards qualifiers
In file included from /usr/include/c++/10/bits/stl_algobase.h:64,
from /usr/include/c++/10/vector:60,
from towers.h:1,
from towers.cpp:1:
/usr/include/c++/10/bits/stl_pair.h:489:5: note: candidate: 'template<class _T1, class _T2> constexpr bool std::operator<(const std::pair<_T1, _T2>&, const std::pair<_T1, _T2>&)'
489 | operator<(const pair<_T1, _T2>& __x, const pair<_T1, _T2>& __y)
| ^~~~~~~~
/usr/include/c++/10/bits/stl_pair.h:489:5: note: template argument deduction/substitution failed:
In file included from /usr/include/c++/10/bits/stl_tree.h:65,
from /usr/include/c++/10/set:60,
from towers.cpp:2:
/usr/include/c++/10/bits/stl_function.h:386:20: note: 'const TourTrieeIndex' is not derived from 'const std::pair<_T1, _T2>'
386 | { return __x < __y; }
| ~~~~^~~~~
In file included from /usr/include/c++/10/bits/stl_algobase.h:67,
from /usr/include/c++/10/vector:60,
from towers.h:1,
from towers.cpp:1:
/usr/include/c++/10/bits/stl_iterator.h:366:5: note: candidate: 'template<class _Iterator> constexpr bool std::operator<(const std::reverse_iterator<_Iterator>&, const std::reverse_iterator<_Iterator>&)'
366 | operator<(const reverse_iterator<_Iterator>& __x,
| ^~~~~~~~
/usr/include/c++/10/bits/stl_iterator.h:366:5: note: template argument deduction/substitution failed:
In file included from /usr/include/c++/10/bits/stl_tree.h:65,
from /usr/include/c++/10/set:60,
from towers.cpp:2:
/usr/include/c++/10/bits/stl_function.h:386:20: note: 'const TourTrieeIndex' is not derived from 'const std::reverse_iterator<_Iterator>'
386 | { return __x < __y; }
| ~~~~^~~~~
In file included from /usr/include/c++/10/bits/stl_algobase.h:67,
from /usr/include/c++/10/vector:60,
from towers.h:1,
from towers.cpp:1:
/usr/include/c++/10/bits/stl_iterator.h:404:5: note: candidate: 'template<class _IteratorL, class _IteratorR> constexpr bool std::operator<(const std::reverse_iterator<_Iterator>&, const std::reverse_iterator<_IteratorR>&)'
404 | operator<(const reverse_iterator<_IteratorL>& __x,
| ^~~~~~~~
/usr/include/c++/10/bits/stl_iterator.h:404:5: note: template argument deduction/substitution failed:
In file included from /usr/include/c++/10/bits/stl_tree.h:65,
from /usr/include/c++/10/set:60,
from towers.cpp:2:
/usr/include/c++/10/bits/stl_function.h:386:20: note: 'const TourTrieeIndex' is not derived from 'const std::reverse_iterator<_Iterator>'
386 | { return __x < __y; }
| ~~~~^~~~~
In file included from /usr/include/c++/10/bits/stl_algobase.h:67,
from /usr/include/c++/10/vector:60,
from towers.h:1,
from towers.cpp:1:
/usr/include/c++/10/bits/stl_iterator.h:1451:5: note: candidate: 'template<class _IteratorL, class _IteratorR> constexpr bool std::operator<(const std::move_iterator<_IteratorL>&, const std::move_iterator<_IteratorR>&)'
1451 | operator<(const move_iterator<_IteratorL>& __x,
| ^~~~~~~~
/usr/include/c++/10/bits/stl_iterator.h:1451:5: note: template argument deduction/substitution failed:
In file included from /usr/include/c++/10/bits/stl_tree.h:65,
from /usr/include/c++/10/set:60,
from towers.cpp:2:
/usr/include/c++/10/bits/stl_function.h:386:20: note: 'const TourTrieeIndex' is not derived from 'const std::move_iterator<_IteratorL>'
386 | { return __x < __y; }
| ~~~~^~~~~
In file included from /usr/include/c++/10/bits/stl_algobase.h:67,
from /usr/include/c++/10/vector:60,
from towers.h:1,
from towers.cpp:1:
/usr/include/c++/10/bits/stl_iterator.h:1507:5: note: candidate: 'template<class _Iterator> constexpr bool std::operator<(const std::move_iterator<_IteratorL>&, const std::move_iterator<_IteratorL>&)'
1507 | operator<(const move_iterator<_Iterator>& __x,
| ^~~~~~~~
/usr/include/c++/10/bits/stl_iterator.h:1507:5: note: template argument deduction/substitution failed:
In file included from /usr/include/c++/10/bits/stl_tree.h:65,
from /usr/include/c++/10/set:60,
from towers.cpp:2:
/usr/include/c++/10/bits/stl_function.h:386:20: note: 'const TourTrieeIndex' is not derived from 'const std::move_iterator<_IteratorL>'
386 | { return __x < __y; }
| ~~~~^~~~~
In file included from /usr/include/c++/10/vector:67,
from towers.h:1,
from towers.cpp:1:
/usr/include/c++/10/bits/stl_vector.h:1930:5: note: candidate: 'template<class _Tp, class _Alloc> bool std::operator<(const std::vector<_Tp, _Alloc>&, const std::vector<_Tp, _Alloc>&)'
1930 | operator<(const vector<_Tp, _Alloc>& __x, const vector<_Tp, _Alloc>& __y)
| ^~~~~~~~
/usr/include/c++/10/bits/stl_vector.h:1930:5: note: template argument deduction/substitution failed:
In file included from /usr/include/c++/10/bits/stl_tree.h:65,
from /usr/include/c++/10/set:60,
from towers.cpp:2:
/usr/include/c++/10/bits/stl_function.h:386:20: note: 'const TourTrieeIndex' is not derived from 'const std::vector<_Tp, _Alloc>'
386 | { return __x < __y; }
| ~~~~^~~~~
In file included from /usr/include/c++/10/bits/node_handle.h:39,
from /usr/include/c++/10/bits/stl_tree.h:72,
from /usr/include/c++/10/set:60,
from towers.cpp:2:
/usr/include/c++/10/optional:1003:5: note: candidate: 'template<class _Tp, class _Up> constexpr std::__optional_relop_t<decltype ((declval<_Tp>() < declval<_Up>()))> std::operator<(const std::optional<_Tp>&, const std::optional<_Up>&)'
1003 | operator<(const optional<_Tp>& __lhs, const optional<_Up>& __rhs)
| ^~~~~~~~
/usr/include/c++/10/optional:1003:5: note: template argument deduction/substitution failed:
In file included from /usr/include/c++/10/bits/stl_tree.h:65,
from /usr/include/c++/10/set:60,
from towers.cpp:2:
/usr/include/c++/10/bits/stl_function.h:386:20: note: 'const TourTrieeIndex' is not derived from 'const std::optional<_Tp>'
386 | { return __x < __y; }
| ~~~~^~~~~
In file included from /usr/include/c++/10/bits/node_handle.h:39,
from /usr/include/c++/10/bits/stl_tree.h:72,
from /usr/include/c++/10/set:60,
from towers.cpp:2:
/usr/include/c++/10/optional:1071:5: note: candidate: 'template<class _Tp> constexpr bool std::operator<(const std::optional<_Tp>&, std::nullopt_t)'
1071 | operator<(const optional<_Tp>& /* __lhs */, nullopt_t) noexcept
| ^~~~~~~~
/usr/include/c++/10/optional:1071:5: note: template argument deduction/substitution failed:
In file included from /usr/include/c++/10/bits/stl_tree.h:65,
from /usr/include/c++/10/set:60,
from towers.cpp:2:
/usr/include/c++/10/bits/stl_function.h:386:20: note: 'const TourTrieeIndex' is not derived from 'const std::optional<_Tp>'
386 | { return __x < __y; }
| ~~~~^~~~~
In file included from /usr/include/c++/10/bits/node_handle.h:39,
from /usr/include/c++/10/bits/stl_tree.h:72,
from /usr/include/c++/10/set:60,
from towers.cpp:2:
/usr/include/c++/10/optional:1076:5: note: candidate: 'template<class _Tp> constexpr bool std::operator<(std::nullopt_t, const std::optional<_Tp>&)'
1076 | operator<(nullopt_t, const optional<_Tp>& __rhs) noexcept
| ^~~~~~~~
/usr/include/c++/10/optional:1076:5: note: template argument deduction/substitution failed:
In file included from /usr/include/c++/10/bits/stl_tree.h:65,
from /usr/include/c++/10/set:60,
from towers.cpp:2:
/usr/include/c++/10/bits/stl_function.h:386:20: note: 'const TourTrieeIndex' is not derived from 'const std::optional<_Tp>'
386 | { return __x < __y; }
| ~~~~^~~~~
In file included from /usr/include/c++/10/bits/node_handle.h:39,
from /usr/include/c++/10/bits/stl_tree.h:72,
from /usr/include/c++/10/set:60,
from towers.cpp:2:
/usr/include/c++/10/optional:1137:5: note: candidate: 'template<class _Tp, class _Up> constexpr std::__optional_relop_t<decltype ((declval<_Tp>() < declval<_Up>()))> std::operator<(const std::optional<_Tp>&, const _Up&)'
1137 | operator<(const optional<_Tp>& __lhs, const _Up& __rhs)
| ^~~~~~~~
/usr/include/c++/10/optional:1137:5: note: template argument deduction/substitution failed:
In file included from /usr/include/c++/10/bits/stl_tree.h:65,
from /usr/include/c++/10/set:60,
from towers.cpp:2:
/usr/include/c++/10/bits/stl_function.h:386:20: note: 'const TourTrieeIndex' is not derived from 'const std::optional<_Tp>'
386 | { return __x < __y; }
| ~~~~^~~~~
In file included from /usr/include/c++/10/bits/node_handle.h:39,
from /usr/include/c++/10/bits/stl_tree.h:72,
from /usr/include/c++/10/set:60,
from towers.cpp:2:
/usr/include/c++/10/optional:1143:5: note: candidate: 'template<class _Tp, class _Up> constexpr std::__optional_relop_t<decltype ((declval<_Up>() < declval<_Tp>()))> std::operator<(const _Up&, const std::optional<_Tp>&)'
1143 | operator<(const _Up& __lhs, const optional<_Tp>& __rhs)
| ^~~~~~~~
/usr/include/c++/10/optional:1143:5: note: template argument deduction/substitution failed:
In file included from /usr/include/c++/10/bits/stl_tree.h:65,
from /usr/include/c++/10/set:60,
from towers.cpp:2:
/usr/include/c++/10/bits/stl_function.h:386:20: note: 'const TourTrieeIndex' is not derived from 'const std::optional<_Tp>'
386 | { return __x < __y; }
| ~~~~^~~~~
In file included from /usr/include/c++/10/set:61,
from towers.cpp:2:
/usr/include/c++/10/bits/stl_set.h:1023:5: note: candidate: 'template<class _Key, class _Compare, class _Alloc> bool std::operator<(const std::set<_Key, _Compare, _Allocator>&, c