Detalii evaluare #64466606

Rezumat problemă

Se dă un vector cu n elemente, numere naturale. Verificați dacă vectorul are un element majoritar. Numim element majoritar o valoare pentru care numărul de apariții în vector este mai mare decât n/2.

Detalii

Problema Majoritar Operații I/O tastatură/ecran
Limita timp 0.25 secunde Limita memorie Total: 64 MB / Stivă 8 MB
Id soluție #64466606 Utilizator Soroiu Radu (radu_soroiu)
Fișier majoritar.cpp Dimensiune 629 B
Data încărcării 08 Mai 2026, 12:52 Scor/rezultat Eroare de compilare

Evaluare

Mesaj compilare

majoritar.cpp: In function ‘int main()’:
majoritar.cpp:22:63: error: use of ‘auto’ in lambda parameter declaration only available with ‘-std=c++14’ or ‘-std=gnu++14’
   22 |     auto maxim = std::max_element(f.begin(), f.end(),[](const auto& a, const auto& b) {return a.second < b.second;});
      |                                                               ^~~~
majoritar.cpp:22:78: error: use of ‘auto’ in lambda parameter declaration only available with ‘-std=c++14’ or ‘-std=gnu++14’
   22 |     auto maxim = std::max_element(f.begin(), f.end(),[](const auto& a, const auto& b) {return a.second < b.second;});
      |                                                                              ^~~~
majoritar.cpp: In lambda function:
majoritar.cpp:22:97: error: request for member ‘second’ in ‘a’, which is of non-class type ‘const int’
   22 |     auto maxim = std::max_element(f.begin(), f.end(),[](const auto& a, const auto& b) {return a.second < b.second;});
      |                                                                                                 ^~~~~~
majoritar.cpp:22:108: error: request for member ‘second’ in ‘b’, which is of non-class type ‘const int’
   22 |     auto maxim = std::max_element(f.begin(), f.end(),[](const auto& a, const auto& b) {return a.second < b.second;});
      |                                                                                                            ^~~~~~
majoritar.cpp: In function ‘int main()’:
majoritar.cpp:28:14: error: no match for ‘operator>=’ (operand types are ‘std::__detail::_Node_iterator<std::pair<const int, int>, false, false>’ and ‘int’)
   28 |     if(maxim >= m/2){
      |        ~~~~~ ^~ ~~~
      |        |         |
      |        |         int
      |        std::__detail::_Node_iterator<std::pair<const int, int>, false, false>
In file included from /usr/include/c++/13/regex:68,
                 from /usr/include/x86_64-linux-gnu/c++/13/bits/stdc++.h:181,
                 from majoritar.cpp:1:
/usr/include/c++/13/bits/regex.h:1165:5: note: candidate: ‘template<class _BiIter> bool std::__cxx11::operator>=(const sub_match<_BiIter>&, const sub_match<_BiIter>&)’
 1165 |     operator>=(const sub_match<_BiIter>& __lhs, const sub_match<_BiIter>& __rhs)
      |     ^~~~~~~~
/usr/include/c++/13/bits/regex.h:1165:5: note:   template argument deduction/substitution failed:
majoritar.cpp:28:19: note:   ‘std::__detail::_Node_iterator<std::pair<const int, int>, false, false>’ is not derived from ‘const std::__cxx11::sub_match<_BiIter>’
   28 |     if(maxim >= m/2){
      |                   ^
/usr/include/c++/13/bits/regex.h:1248:5: note: candidate: ‘template<class _Bi_iter, class _Ch_traits, class _Ch_alloc> bool std::__cxx11::operator>=(__sub_match_string<_Bi_iter, _Ch_traits, _Ch_alloc>&, const sub_match<_BiIter>&)’
 1248 |     operator>=(const __sub_match_string<_Bi_iter, _Ch_traits, _Ch_alloc>& __lhs,
      |     ^~~~~~~~
/usr/include/c++/13/bits/regex.h:1248:5: note:   template argument deduction/substitution failed:
majoritar.cpp:28:19: note:   ‘std::__detail::_Node_iterator<std::pair<const int, int>, false, false>’ is not derived from ‘std::__cxx11::__sub_match_string<_Bi_iter, _Ch_traits, _Ch_alloc>’
   28 |     if(maxim >= m/2){
      |                   ^
/usr/include/c++/13/bits/regex.h:1341:5: note: candidate: ‘template<class _Bi_iter, class _Ch_traits, class _Ch_alloc> bool std::__cxx11::operator>=(const sub_match<_BiIter>&, __sub_match_string<_Bi_iter, _Ch_traits, _Ch_alloc>&)’
 1341 |     operator>=(const sub_match<_Bi_iter>& __lhs,
      |     ^~~~~~~~
/usr/include/c++/13/bits/regex.h:1341:5: note:   template argument deduction/substitution failed:
majoritar.cpp:28:19: note:   ‘std::__detail::_Node_iterator<std::pair<const int, int>, false, false>’ is not derived from ‘const std::__cxx11::sub_match<_BiIter>’
   28 |     if(maxim >= m/2){
      |                   ^
/usr/include/c++/13/bits/regex.h:1415:5: note: candidate: ‘template<class _Bi_iter> bool std::__cxx11::operator>=(const typename std::iterator_traits<_Iter>::value_type*, const sub_match<_BiIter>&)’
 1415 |     operator>=(typename iterator_traits<_Bi_iter>::value_type const* __lhs,
      |     ^~~~~~~~
/usr/include/c++/13/bits/regex.h:1415:5: note:   template argument deduction/substitution failed:
majoritar.cpp:28:19: note:   mismatched types ‘const std::__cxx11::sub_match<_BiIter>’ and ‘int’
   28 |     if(maxim >= m/2){
      |                   ^
/usr/include/c++/13/bits/regex.h:1509:5: note: candidate: ‘template<class _Bi_iter> bool std::__cxx11::operator>=(const sub_match<_BiIter>&, const typename std::iterator_traits<_Iter>::value_type*)’
 1509 |     operator>=(const sub_match<_Bi_iter>& __lhs,
      |     ^~~~~~~~
/usr/include/c++/13/bits/regex.h:1509:5: note:   template argument deduction/substitution failed:
majoritar.cpp:28:19: note:   ‘std::__detail::_Node_iterator<std::pair<const int, int>, false, false>’ is not derived from ‘const std::__cxx11::sub_match<_BiIter>’
   28 |     if(maxim >= m/2){
      |                   ^
/usr/include/c++/13/bits/regex.h:1586:5: note: candidate: ‘template<class _Bi_iter> bool std::__cxx11::operator>=(const typename std::iterator_traits<_Iter>::value_type&, const sub_match<_BiIter>&)’
 1586 |     operator>=(typename iterator_traits<_Bi_iter>::value_type const& __lhs,
      |     ^~~~~~~~
/usr/include/c++/13/bits/regex.h:1586:5: note:   template argument deduction/substitution failed:
majoritar.cpp:28:19: note:   mismatched types ‘const std::__cxx11::sub_match<_BiIter>’ and ‘int’
   28 |     if(maxim >= m/2){
      |                   ^
/usr/include/c++/13/bits/regex.h:1686:5: note: candidate: ‘template<class _Bi_iter> bool std::__cxx11::operator>=(const sub_match<_BiIter>&, const typename std::iterator_traits<_Iter>::value_type&)’
 1686 |     operator>=(const sub_match<_Bi_iter>& __lhs,
      |     ^~~~~~~~
/usr/include/c++/13/bits/regex.h:1686:5: note:   template argument deduction/substitution failed:
majoritar.cpp:28:19: note:   ‘std::__detail::_Node_iterator<std::pair<const int, int>, false, false>’ is not derived from ‘const std::__cxx11::sub_match<_BiIter>’
   28 |     if(maxim >= m/2){
      |                   ^
In file included from /usr/include/c++/13/bits/stl_algobase.h:64,
                 from /usr/include/c++/13/algorithm:60,
                 from /usr/include/x86_64-linux-gnu/c++/13/bits/stdc++.h:51:
/usr/include/c++/13/bits/stl_pair.h:860:5: note: candidate: ‘template<class _T1, class _T2> constexpr bool std::operator>=(const pair<_T1, _T2>&, const pair<_T1, _T2>&)’
  860 |     operator>=(const pair<_T1, _T2>& __x, const pair<_T1, _T2>& __y)
      |     ^~~~~~~~
/usr/include/c++/13/bits/stl_pair.h:860:5: note:   template argument deduction/substitution failed:
majoritar.cpp:28:19: note:   ‘std::__detail::_Node_iterator<std::pair<const int, int>, false, false>’ is not derived from ‘const std::pair<_T1, _T2>’
   28 |     if(maxim >= m/2){
      |                   ^
In file included from /usr/include/c++/13/bits/stl_algobase.h:67:
/usr/include/c++/13/bits/stl_iterator.h:483:5: note: candidate: ‘template<class _Iterator> bool std::operator>=(const reverse_iterator<_Iterator>&, const reverse_iterator<_Iterator>&)’
  483 |     operator>=(const reverse_iterator<_Iterator>& __x,
      |     ^~~~~~~~
/usr/include/c++/13/bits/stl_iterator.h:483:5: note:   template argument deduction/substitution failed:
majoritar.cpp:28:19: note:   ‘std::__detail::_Node_iterator<std::pair<const int, int>, false, false>’ is not derived from ‘const std::reverse_iterator<_Iterator>’
   28 |     if(maxim >= m/2){
      |                   ^
/usr/include/c++/13/bits/stl_iterator.h:527:5: note: candidate: ‘template<class _IteratorL, class _IteratorR> bool std::operator>=(const reverse_iterator<_Iterator>&, const reverse_iterator<_IteratorR>&)’
  527 |     operator>=(const reverse_iterator<_IteratorL>& __x,
      |     ^~~~~~~~
/usr/include/c++/13/bits/stl_iterator.h:527:5: note:   template argument deduction/substitution failed:
majoritar.cpp:28:19: note:   ‘std::__detail::_Node_iterator<std::pair<const int, int>, false, false>’ is not derived from ‘const std::reverse_iterator<_Iterator>’
   28 |     if(maxim >= m/2){
      |                   ^
/usr/include/c++/13/bits/stl_iterator.h:1735:5: note: candidate: ‘template<class _IteratorL, class _IteratorR> bool std::operator>=(const move_iterator<_IteratorL>&, const move_iterator<_IteratorR>&)’
 1735 |     operator>=(const move_iterator<_IteratorL>& __x,
      |     ^~~~~~~~
/usr/include/c++/13/bits/stl_iterator.h:1735:5: note:   template argument deduction/substitution failed:
majoritar.cpp:28:19: note:   ‘std::__detail::_Node_iterator<std::pair<const int, int>, false, false>’ is not derived from ‘const std::move_iterator<_IteratorL>’
   28 |     if(maxim >= m/2){
      |                   ^
/usr/include/c++/13/bits/stl_iterator.h:1791:5: note: candidate: ‘template<class _Iterator> bool std::operator>=(const move_iterator<_IteratorL>&, const move_iterator<_IteratorL>&)’
 1791 |     operator>=(const move_iterator<_Iterator>& __x,
      |     ^~~~~~~~
/usr/include/c++/13/bits/stl_iterator.h:1791:5: note:   template argument deduction/substitution failed:
majoritar.cpp:28:19: note:   ‘std::__detail::_Node_iterator<std::pair<const int, int>, false, false>’ is not derived from ‘const std::move_iterator<_IteratorL>’
   28 |     if(maxim >= m/2){
      |                   ^
In file included from /usr/include/c++/13/string:54,
                 from /usr/include/c++/13/bitset:52,
                 from /usr/include/x86_64-linux-gnu/c++/13/bits/stdc++.h:52:
/usr/include/c++/13/bits/basic_string.h:3952:5: note: candidate: ‘template<class _CharT, class _Traits, class _Alloc> bool std::operator>=(const __cxx11::basic_string<_CharT, _Traits, _Alloc>&, const __cxx11::basic_string<_CharT, _Traits, _Alloc>&)’
 3952 |     operator>=(const basic_string<_CharT, _Traits, _Alloc>& __lhs,
      |     ^~~~~~~~
/usr/include/c++/13/bits/basic_string.h:3952:5: note:   template argument deduction/substitution failed:
majoritar.cpp:28:19: note:   ‘std::__detail::_Node_iterator<std::pair<const int, int>, false, false>’ is not derived from ‘const std::__cxx11::basic_string<_CharT, _Traits, _Alloc>’
   28 |     if(maxim >= m/2){
      |                   ^
/usr/include/c++/13/bits/basic_string.h:3966:5: note: candidate: ‘template<class _CharT, class _Traits, class _Alloc> bool std::operator>=(const __cxx11::basic_string<_CharT, _Traits, _Alloc>&, const _CharT*)’
 3966 |     operator>=(const basic_string<_CharT, _Traits, _Alloc>& __lhs,
      |     ^~~~~~~~
/usr/include/c++/13/bits/basic_string.h:3966:5: note:   template argument deduction/substitution failed:
majoritar.cpp:28:19: note:   ‘std::__detail::_Node_iterator<std::pair<const int, int>, false, false>’ is not derived from ‘const std::__cxx11::basic_string<_CharT, _Traits, _Alloc>’
   28 |     if(maxim >= m/2){
      |                   ^
/usr/include/c++/13/bits/basic_string.h:3979:5: note: candidate: ‘template<class _CharT, class _Traits, class _Alloc> bool std::operator>=(const _CharT*, const __cxx11::basic_string<_CharT, _Traits, _Alloc>&)’
 3979 |     operator>=(const _CharT* __lhs,
      |     ^~~~~~~~
/usr/include/c++/13/bits/basic_string.h:3979:5: note:   template argument deduction/substitution failed:
majoritar.cpp:28:19: note:   mismatched types ‘const _CharT*’ and ‘std::__detail::_Node_iterator<std::pair<const int, int>, false, false>’
   28 |     if(maxim >= m/2){
      |                   ^
In file included from /usr/include/c++/13/functional:53,
                 from /usr/include/x86_64-linux-gnu/c++/13/bits/stdc++.h:53:
/usr/include/c++/13/tuple:1992:5: note: candidate: ‘template<class ... _TElements, class ... _UElements> constexpr bool std::operator>=(const tuple<_Elements ...>&, const tuple<_Types ...>&)’
 1992 |     operator>=(const tuple<_TElements...>& __t,
      |     ^~~~~~~~
/usr/include/c++/13/tuple:1992:5: note:   template argument deduction/substitution failed:
majoritar.cpp:28:19: note:   ‘std::__detail::_Node_iterator<std::pair<const int, int>, false, false>’ is not derived from ‘const std::tuple<_Elements ...>’
   28 |     if(maxim >= m/2){
      |                   ^
In file included from /usr/include/c++/13/memory:78,
                 from /usr/include/x86_64-linux-gnu/c++/13/bits/stdc++.h:56:
/usr/include/c++/13/bits/unique_ptr.h:963:5: note: candidate: ‘template<class _Tp, class _Dp, class _Up, class _Ep> bool std::operator>=(const unique_ptr<_Tp, _Dp>&, const unique_ptr<_Up, _Ep>&)’
  963 |     operator>=(const unique_ptr<_Tp, _Dp>& __x,
      |     ^~~~~~~~
/usr/include/c++/13/bits/unique_ptr.h:963:5: note:   template argument deduction/substitution failed:
majoritar.cpp:28:19: note:   ‘std::__detail::_Node_iterator<std::pair<const int, int>, false, false>’ is not derived from ‘const std::unique_ptr<_Tp, _Dp>’
   28 |     if(maxim >= m/2){
      |                   ^
/usr/include/c++/13/bits/unique_ptr.h:971:5: note: candidate: ‘template<class _Tp, class _Dp> bool std::operator>=(const unique_ptr<_Tp, _Dp>&, nullptr_t)’
  971 |     operator>=(const unique_ptr<_Tp, _Dp>& __x, nullptr_t)
      |     ^~~~~~~~
/usr/include/c++/13/bits/unique_ptr.h:971:5: note:   template argument deduction/substitution failed:
majoritar.cpp:28:19: note:   ‘std::__detail::_Node_iterator<std::pair<const int, int>, false, false>’ is not derived from ‘const std::unique_ptr<_Tp, _Dp>’
   28 |     if(maxim >= m/2){
      |                   ^
/usr/include/c++/13/bits/unique_ptr.h:977:5: note: candidate: ‘template<class _Tp, class _Dp> bool std::operator>=(nullptr_t, const unique_ptr<_Tp, _Dp>&)’
  977 |     operator>=(nullptr_t, const unique_ptr<_Tp, _Dp>& __x)
      |     ^~~~~~~~
/usr/include/c++/13/bits/unique_ptr.h:977:5: note:   template argument deduction/substitution failed:
majoritar.cpp:28:19: note:   mismatched types ‘const std::unique_ptr<_Tp, _Dp>’ and ‘int’
   28 |     if(maxim >= m/2){
      |                   ^
In file included from /usr/include/c++/13/bits/shared_ptr.h:53,
                 from /usr/include/c++/13/memory:80:
/usr/include/c++/13/bits/shared_ptr_base.h:1899:5: note: candidate: ‘template<class _Tp1, class _Tp2, __gnu_cxx::_Lock_policy _Lp> bool std::operator>=(const __shared_ptr<_Tp1, _Lp>&, const __shared_ptr<_Tp2, _Lp>&)’
 1899 |     operator>=(const __shared_ptr<_Tp1, _Lp>& __a,
      |     ^~~~~~~~
/usr/include/c++/13/bits/shared_ptr_base.h:1899:5: note:   template argument deduction/substitution failed:
majoritar.cpp:28:19: note:   ‘std::__detail::_Node_iterator<std::pair<const int, int>, false, false>’ is not derived from ‘const std::__shared_ptr<_Tp1, _Lp>’
   28 |     if(maxim >= m/2){
      |                   ^
/usr/include/c++/13/bits/shared_ptr_base.h:1905:5: note: candidate: ‘template<class _Tp, __gnu_cxx::_Lock_policy _Lp> bool std::operator>=(const __shared_ptr<_Tp, _Lp>&, nullptr_t)’
 1905 |     operator>=(const __shared_ptr<_Tp, _Lp>& __a, nullptr_t) noexcept
      |     ^~~~~~~~
/usr/include/c++/13/bits/shared_ptr_base.h:1905:5: note:   template argument deduction/substitution failed:
majoritar.cpp:28:19: note:   ‘std::__detail::_Node_iterator<std::pair<const int, int>, false, false>’ is not derived from ‘const std::__shared_ptr<_Tp, _Lp>’
   28 |     if(maxim >= m/2){
      |                   ^
/usr/include/c++/13/bits/shared_ptr_base.h:1910:5: note: candidate: ‘template<class _Tp, __gnu_cxx::_Lock_policy _Lp> bool std::operator>=(nullptr_t, const __shared_ptr<_Tp, _Lp>&)’
 1910 |     operator>=(nullptr_t, const __shared_ptr<_Tp, _Lp>& __a) noexcept
      |     ^~~~~~~~
/usr/include/c++/13/bits/shared_ptr_base.h:1910:5: note:   template argument deduction/substitution failed:
majoritar.cpp:28:19: note:   mismatched types ‘const std::__shared_ptr<_Tp, _Lp>’ and ‘int’
   28 |     if(maxim >= m/2){
      |                   ^
/usr/include/c++/13/bits/shared_ptr.h:671:5: note: candidate: ‘template<class _Tp, class _Up> bool std::operator>=(const shared_ptr<_Tp>&, const shared_ptr<_Tp>&)’
  671 |     operator>=(const shared_ptr<_Tp>& __a, const shared_ptr<_Up>& __b) noexcept
      |     ^~~~~~~~
/usr/include/c++/13/bits/shared_ptr.h:671:5: note:   template argument deduction/substitution failed:
majoritar.cpp:28:19: note:   ‘std::__detail::_Node_iterator<std::pair<const int, int>, false, false>’ is not derived from ‘const std::shared_ptr<_Tp>’
   28 |     if(maxim >= m/2){
      |                   ^
/usr/include/c++/13/bits/shared_ptr.h:677:5: note: candidate: ‘template<class _Tp> bool std::operator>=(const shared_ptr<_Tp>&, nullptr_t)’
  677 |     operator>=(const shared_ptr<_Tp>& __a, nullptr_t) noexcept
      |     ^~~~~~~~
/usr/include/c++/13/bits/shared_ptr.h:677:5: note:   template argument deduction/substitution failed:
majoritar.cpp:28:19: note:   ‘std::__detail::_Node_iterator<std::pair<const int, int>, false, false>’ is not derived from ‘const std::shared_ptr<_Tp>’
   28 |     if(maxim >= m/2){
      |                   ^
/usr/include/c++/13/bits/shared_ptr.h:683:5: note: candidate: ‘template<class _Tp> bool std::operator>=(nullptr_t, const shared_ptr<_Tp>&)’
  683 |     operator>=(nullptr_t, const shared_ptr<_Tp>& __a) noexcept
      |     ^~~~~~~~
/usr/include/c++/13/bits/shared_ptr.h:683:5: note:   template argument deduction/substitution failed:
majoritar.cpp:28:19: note:   mismatched types ‘const std::shared_ptr<_Tp>’ and ‘int’
   28 |     if(maxim >= m/2){
      |                   ^
In file included from /usr/include/x86_64-linux-gnu/c++/13/bits/stdc++.h:63:
/usr/include/c++/13/array:357:5: note: candidate: ‘template<class _Tp, long unsigned int _Nm> bool std::operator>=(const array<_Tp, _Nm>&, const array<_Tp, _Nm>&)’
  357 |     operator>=(const array<_Tp, _Nm>& __one, const array<_Tp, _Nm>& __two)
      |     ^~~~~~~~
/usr/include/c++/13/array:357:5: note:   template argument deduction/substitution failed:
majoritar.cpp:28:19: note:   ‘std::__detail::_Node_iterator<std::pair<const int, int>, false, false>’ is not derived from ‘const std::array<_Tp, _Nm>’
   28 |     if(maxim >= m/2){
      |                   ^
In file included from /usr/include/c++/13/deque:66,
                 from /usr/include/x86_64-linux-gnu/c++/13/bits/stdc++.h:139:
/usr/include/c++/13/bits/stl_deque.h:2359:5: note: candidate: ‘template<class _Tp, class _Alloc> bool std::operator>=(const deque<_Tp, _Alloc>&, const deque<_Tp, _Alloc>&)’
 2359 |     operator>=(const deque<_Tp, _Alloc>& __x, const deque<_Tp, _Alloc>& __y)
      |     ^~~~~~~~
/usr/include/c++/13/bits/stl_deque.h:2359:5: note:   template argument deduction/substitution failed:
majoritar.cpp:28:19: note:   ‘std::__detail::_Node_iterator<std::pair<const int, int>, false, false>’ is not derived from ‘const std::deque<_Tp, _Alloc>’
   28 |     if(maxim >= m/2){
      |                   ^
In file included from /usr/include/c++/13/list:65,
                 from /usr/include/x86_64-linux-gnu/c++/13/bits/stdc++.h:150:
/usr/include/c++/13/bits/stl_list.h:2209:5: note: candidate: ‘template<class _Tp, class _Alloc> bool std::operator>=(const __cxx11::list<_Tp, _Alloc>&, const __cxx11::list<_Tp, _Alloc>&)’
 2209 |     operator>=(const list<_Tp, _Alloc>& __x, const list<_Tp, _Alloc>& __y)
      |     ^~~~~~~~
/usr/include/c++/13/bits/stl_list.h:2209:5: note:   template argument deduction/substitution failed:
majoritar.cpp:28:19: note:   ‘std::__detail::_Node_iterator<std::pair<const int, int>, false, false>’ is not derived from ‘const std::__cxx11::list<_Tp, _Alloc>’
   28 |     if(maxim >= m/2){
      |                   ^
In file included from /usr/include/c++/13/map:63,
                 from /usr/include/x86_64-linux-gnu/c++/13/bits/stdc++.h:152:
/usr/include/c++/13/bits/stl_map.h:1579:5: note: candidate: ‘template<class _Key, class _Tp, class _Compare, class _Alloc> bool std::operator>=(const map<_Key, _Tp, _Compare, _Alloc>&, const map<_Key, _Tp, _Compare, _Alloc>&)’
 1579 |     operator>=(const map<_Key, _Tp, _Compare, _Alloc>& __x,
      |     ^~~~~~~~
/usr/include/c++/13/bits/stl_map.h:1579:5: note:   template argument deduction/substitution failed:
majoritar.cpp:28:19: note:   ‘std::__detail::_Node_iterator<std::pair<const int, int>, false, false>’ is not derived from ‘const std::map<_Key, _Tp, _Compare, _Alloc>’
   28 |     if(maxim >= m/2){
      |                   ^
In file included from /usr/include/c++/13/map:64:
/usr/include/c++/13/bits/stl_multimap.h:1200:5: note: candidate: ‘template<class _Key, class _Tp, class _Compare, class _Alloc> bool std::operator>=(const multimap<_Key, _Tp, _Compare, _Alloc>&, const multimap<_Key, _Tp, _Compare, _Alloc>&)’
 1200 |     operator>=(const multimap<_Key, _Tp, _Compare, _Alloc>& __x,
      |     ^~~~~~~~
/usr/include/c++/13/bits/stl_multimap.h:1200:5: note:   template argument deduction/substitution failed:
majoritar.cpp:28:19: note:   ‘std::__detail::_Node_iterator<std::pair<const int, int>, false, false>’ is not derived from ‘const std::multimap<_Key, _Tp, _Compare, _Alloc>’
   28 |     if(maxim >= m/2){
      |                   ^
In file included from /usr/include/c++/13/vector:66,
                 from /usr/include/c++/13/queue:63,
                 from /usr/include/x86_64-linux-gnu/c++/13/bits/stdc++.h:157:
/usr/include/c++/13/bits/stl_vector.h:2104:5: note: candidate: ‘template<class _Tp, class _Alloc> bool std::operator>=(const vector<_Tp, _Alloc>&, const vector<_Tp, _Alloc>&)’
 2104 |     operator>=(const vector<_Tp, _Alloc>& __x, const vector<_Tp, _Alloc>& __y)
      |     ^~~~~~~~
/usr/include/c++/13/bits/stl_vector.h:2104:5: note:   template argument deduction/substitution failed:
majoritar.cpp:28:19: note:   ‘std::__detail::_Node_iterator<std::pair<const int, int>, false, false>’ is not derived from ‘const std::vector<_Tp, _Alloc>’
   28 |     if(maxim >= m/2){
      |                   ^
In file included from /usr/include/c++/13/queue:66:
/usr/include/c++/13/bits/stl_queue.h:427:5: note: candidate: ‘template<class _Tp, class _Seq> bool std::operator>=(const queue<_Tp, _Seq>&, const queue<_Tp, _Seq>&)’
  427 |     operator>=(const queue<_Tp, _Seq>& __x, const queue<_Tp, _Seq>& __y)
      |     ^~~~~~~~
/usr/include/c++/13/bits/stl_queue.h:427:5: note:   template argument deduction/substitution failed:
majoritar.cpp:28:19: note:   ‘std::__detail::_Node_iterator<std::pair<const int, int>, false, false>’ is not derived from ‘const std::queue<_Tp, _Seq>’
   28 |     if(maxim >= m/2){
      |                   ^
In file included from /usr/include/c++/13/set:63,
                 from /usr/include/x86_64-linux-gnu/c++/13/bits/stdc++.h:158:
/usr/include/c++/13/bits/stl_set.h:1053:5: note: candidate: ‘template<class _Key, class _Compare, class _Alloc> bool std::operator>=(const set<_Key, _Compare, _Alloc>&, const set<_Key, _Compare, _Alloc>&)’
 1053 |     operator>=(const set<_Key, _Compare, _Alloc>& __x,
      |     ^~~~~~~~
/usr/include/c++/13/bits/stl_set.h:1053:5: note:   template argument deduction/substitution failed:
majoritar.cpp:28:19: note:   ‘std::__detail::_Node_iterator<std::pair<const int, int>, false, false>’ is not derived from ‘const std::set<_Key, _Compare, _Alloc>’
   28 |     if(maxim >= m/2){
      |                   ^
In file included from /usr/include/c++/13/set:64:
/usr/include/c++/13/bits/stl_multiset.h:1039:5: note: candidate: ‘template<class _Key, class _Compare, class _Alloc> bool std::operator>=(const multiset<_Key, _Compare, _Alloc>&, const multiset<_Key, _Compare, _Alloc>&)’
 1039 |     operator>=(const multiset<_Key, _Compare, _Alloc>& __x,
      |     ^~~~~~~~
/usr/include/c++/13/bits/stl_multiset.h:1039:5: note:   template argument deduction/substitution failed:
majoritar.cpp:28:19: note:   ‘std::__detail::_Node_iterator<std::pair<const int, int>, false, false>’ is not derived from ‘const std::multiset<_Key, _Compare, _Alloc>’
   28 |     if(maxim >= m/2){
      |                   ^
In file included from /usr/include/c++/13/stack:63,
                 from /usr/include/x86_64-linux-gnu/c++/13/bits/stdc++.h:160:
/usr/include/c++/13/bits/stl_stack.h:403:5: note: candidate: ‘template<class _Tp, class _Seq> bool std::operator>=(const stack<_Tp, _Seq>&, const stack<_Tp, _Seq>&)’
  403 |     operator>=(const stack<_Tp, _Seq>& __x, const stack<_Tp, _Seq>& __y)
      |     ^~~~~~~~
/usr/include/c++/13/bits/stl_stack.h:403:5: note:   template argument deduction/substitution failed:
majoritar.cpp:28:19: note:   ‘std::__detail::_Node_iterator<std::pair<const int, int>, false, false>’ is not derived from ‘const std::stack<_Tp, _Seq>’
   28 |     if(maxim >= m/2){
      |                   ^
In file included from /usr/include/c++/13/valarray:605,
                 from /usr/include/x86_64-linux-gnu/c++/13/bits/stdc++.h:166:
/usr/include/c++/13/bits/valarray_after.h:422:5: note: candidate: ‘template<class _Dom1, class _Dom2> std::_Expr<std::__detail::_BinClos<std::__greater_equal, std::_Expr, std::_Expr, _Dom1, _Dom2>, typename std::__fun<std::__greater_equal, typename _Dom1::value_type>::result_type> std::operator>=(const _Expr<_Dom1, typename _Dom1::value_type>&, const _Expr<_Dom2, typename _Dom2::value_type>&)’
  422 |     _DEFINE_EXPR_BINARY_OPERATOR(>=, struct std::__greater_equal)
      |     ^~~~~~~~~~~~~~~~~~~~~~~~~~~~
/usr/include/c++/13/bits/valarray_after.h:422:5: note:   template argument deduction/substitution failed:
majoritar.cpp:28:19: note:   ‘std::__detail::_Node_iterator<std::pair<const int, int>, false, false>’ is not derived from ‘const std::_Expr<_Dom1, typename _Dom1::value_type>’
   28 |     if(maxim >= m/2){
      |                   ^
/usr/include/c++/13/bits/valarray_after.h:422:5: note: candidate: ‘template<class _Dom> std::_Expr<std::__detail::_BinClos<std::__greater_equal, std::_Expr, std::_Constant, _Dom, typename _Dom::value_type>, typename std::__fun<std::__greater_equal, typename _Dom1::value_type>::result_type> std::operator>=(const _Expr<_Dom1, typename _Dom1::value_type>&, const typename _Dom::value_type&)’
  422 |     _DEFINE_EXPR_BINARY_OPERATOR(>=, struct std::__greater_equal)
      |     ^~~~~~~~~~~~~~~~~~~~~~~~~~~~
/usr/include/c++/13/bits/valarray_after.h:422:5: note:   template argument deduction/substitution failed:
majoritar.cpp:28:19: note:   ‘std::__detail::_Node_iterator<std::pair<const int, int>, false, false>’ is not derived from ‘const std::_Expr<_Dom1, typename _Dom1::value_type>’
   28 |     if(maxim >= m/2){
      |                   ^
/usr/include/c++/13/bits/valarray_after.h:422:5: note: candidate: ‘template<class _Dom> std::_Expr<std::__detail::_BinClos<std::__greater_equal, std::_Constant, std::_Expr, typename _Dom::value_type, _Dom>, typename std::__fun<std::__greater_equal, typename _Dom1::value_type>::result_type> std::operator>=(const typename _Dom::value_type&, const _Expr<_Dom1, typename _Dom1::value_type>&)’
  422 |     _DEFINE_EXPR_BINARY_OPERATOR(>=, struct std::__greater_equal)
      |     ^~~~~~~~~~~~~~~~~~~~~~~~~~~~
/usr/include/c++/13/bits/valarray_after.h:422:5: note:   template argument deduction/substitution failed:
majoritar.cpp:28:19: note:   mismatched types ‘const std::_Expr<_Dom1, typename _Dom1::value_type>’ and ‘int’
   28 |     if(maxim >= m/2){
      |                   ^
/usr/include/c++/13/bits/valarray_after.h:422:5: note: candidate: ‘template<class _Dom> std::_Expr<std::__detail::_BinClos<std::__greater_equal, std::_Expr, std::_ValArray, _Dom, typename _Dom::value_type>, typename std::__fun<std::__greater_equal, typename _Dom1::value_type>::result_type> std::operator>=(const _Expr<_Dom1, typename _Dom1::value_type>&, const valarray<typename _Dom::value_type>&)’
  422 |     _DEFINE_EXPR_BINARY_OPERATOR(>=, struct std::__greater_equal)
      |     ^~~~~~~~~~~~~~~~~~~~~~~~~~~~
/usr/include/c++/13/bits/valarray_after.h:422:5: note:   template argument deduction/substitution failed:
majoritar.cpp:28:19: note:   ‘std::__detail::_Node_iterator<std::pair<const int, int>, false, false>’ is not derived from ‘const std::_Expr<_Dom1, typename _Dom1::value_type>’
   28 |     if(maxim >= m/2){
      |                   ^
/usr/include/c++/13/bits/valarray_after.h:422:5: note: candidate: ‘template<class _Dom> std::_Expr<std::__detail::_BinClos<std::__greater_equal, std::_ValArray, std::_Expr, typename _Dom::value_type, _Dom>, typename std::__fun<std::__greater_equal, typename _Dom1::value_type>::result_type> std::operator>=(const valarray<typename _Dom::value_type>&, const _Expr<_Dom1, typename _Dom1::value_type>&)’
  422 |     _DEFINE_EXPR_BINARY_OPERATOR(>=, struct std::__greater_equal)
      |     ^~~~~~~~~~~~~~~~~~~~~~~~~~~~
/usr/include/c++/13/bits/valarray_after.h:422:5: note:   template argument deduction/substitution failed:
majoritar.cpp:28:19: note:   mismatched types ‘const std::_Expr<_Dom1, typename _Dom1::value_type>’ and ‘int’
   28 |     if(maxim >= m/2){
      |                   ^
/usr/include/c++/13/valarray:1213:1: note: candidate: ‘template<class _Tp> std::_Expr<std::__detail::_BinClos<std::__greater_equal, std::_ValArray, std::_ValArray, _Tp, _Tp>, typename std::__fun<std::__greater_equal, _Tp>::result_type> std::operator>=(const valarray<_Tp>&, const valarray<_Tp>&)’
 1213 | _DEFINE_BINARY_OPERATOR(>=, __greater_equal)
      | ^~~~~~~~~~~~~~~~~~~~~~~
/usr/include/c++/13/valarray:1213:1: note:   template argument deduction/substitution failed:
majoritar.cpp:28:19: note:   ‘std::__detail::_Node_iterator<std::pair<const int, int>, false, false>’ is not derived from ‘const std::valarray<_Tp>’
   28 |     if(maxim >= m/2){
      |                   ^
/usr/include/c++/13/valarray:1213:1: note: candidate: ‘template<class _Tp> std::_Expr<std::__detail::_BinClos<std::__greater_equal, std::_ValArray, std::_Constant, _Tp, _Tp>, typename std::__fun<std::__greater_equal, _Tp>::result_type> std::operator>=(const valarray<_Tp>&, const typename valarray<_Tp>::value_type&)’
 1213 | _DEFINE_BINARY_OPERATOR(>=, __greater_equal)
      | ^~~~~~~~~~~~~~~~~~~~~~~
/usr/include/c++/13/valarray:1213:1: note:   template argument deduction/substitution failed:
majoritar.cpp:28:19: note:   ‘std::__detail::_Node_iterator<std::pair<const int, int>, false, false>’ is not derived from ‘const std::valarray<_Tp>’
   28 |     if(maxim >= m/2){
      |                   ^
/usr/include/c++/13/valarray:1213:1: note: candidate: ‘template<class _Tp> std::_Expr<std::__detail::_BinClos<std::__greater_equal, std::_Constant, std::_ValArray, _Tp, _Tp>, typename std::__fun<std::__greater_equal, _Tp>::result_type> std::operator>=(const typename valarray<_Tp>::value_type&, const valarray<_Tp>&)’
 1213 | _DEFINE_BINARY_OPERATOR(>=, __greater_equal)
      | ^~~~~~~~~~~~~~~~~~~~~~~
/usr/include/c++/13/valarray:1213:1: note:   template argument deduction/substitution failed:
majoritar.cpp:28:19: note:   mismatched types ‘const std::valarray<_Tp>’ and ‘int’
   28 |     if(maxim >= m/2){
      |                   ^
In file included from /usr/include/c++/13/forward_list:40,
                 from /usr/include/x86_64-linux-gnu/c++/13/bits/stdc++.h:175:
/usr/include/c++/13/bits/forward_list.h:1521:5: note: candidate: ‘template<class _Tp, class _Alloc> bool std::operator>=(const forward_list<_Tp, _Alloc>&, const forward_list<_Tp, _Alloc>&)’
 1521 |     operator>=(const forward_list<_Tp, _Alloc>& __lx,
      |     ^~~~~~~~
/usr/include/c++/13/bits/forward_list.h:1521:5: note:   template argument deduction/substitution failed:
majoritar.cpp:28:19: note:   ‘std::__detail::_Node_iterator<std::pair<const int, int>, false, false>’ is not derived from ‘const std::forward_list<_Tp, _Alloc>’
   28 |     if(maxim >= m/2){
      |                   ^
In file included from /usr/include/x86_64-linux-gnu/c++/13/bits/stdc++.h:184:
/usr/include/c++/13/thread:91:3: note: candidate: ‘bool std::operator>=(thread::id, thread::id)’
   91 |   operator>=(thread::id __x, thread::id __y) noexcept
      |   ^~~~~~~~
/usr/include/c++/13/thread:91:25: note:   no known conversion for argument 1 from ‘std::__detail::_Node_iterator<std::pair<const int, int>, false, false>’ to ‘std::thread::id’
   91 |   operator>=(thread::id __x, thread::id __y) noexcept
      |              ~~~~~~~~~~~^~~
majoritar.cpp:29:20: error: no match for ‘operator<<’ (operand types are ‘std::basic_ostream<char>’ and ‘std::__detail::_Node_iterator<std::pair<const int, int>, false, false>’)
   29 |         cout<<"DA "<< maxim;
      |         ~~~~~~~~~~~^~ ~~~~~
      |             |         |
      |             |         std::__detail::_Node_iterator<std::pair<const int, int>, false, false>
      |             std::basic_ostream<char>
In file included from /usr/include/c++/13/istream:41,
                 from /usr/include/c++/13/sstream:40,
                 from /usr/include/c++/13/complex:45,
                 from /usr/include/c++/13/ccomplex:39,
                 from /usr/include/x86_64-linux-gnu/c++/13/bits/stdc++.h:127:
/usr/include/c++/13/ostream:110:7: note: candidate: ‘std::basic_ostream<_CharT, _Traits>::__ostream_type& std::basic_ostream<_CharT, _Traits>::operator<<(__ostream_type& (*)(__ostream_type&)) [with _CharT = char; _Traits = std::char_traits<char>; __ostream_type = std::basic_ostream<char>]’
  110 |       operator<<(__ostream_type& (*__pf)(__ostream_type&))
      |       ^~~~~~~~
/usr/include/c++/13/ostream:110:36: note:   no known conversion for argument 1 from ‘std::__detail::_Node_iterator<std::pair<const int, int>, false, false>’ to ‘std::basic_ostream<char>::__ostream_type& (*)(std::basic_ostream<char>::__ostream_type&)’ {aka ‘std::basic_ostream<char>& (*)(std::basic_ostream<char>&)’}
  110 |       operator<<(__ostream_type& (*__pf)(__ostream_type&))
      |                  ~~~~~~~~~~~~~~~~~~^~~~~~~~~~~~~~~~~~~~~~
/usr/include/c++/13/ostream:119:7: note: candidate: ‘std::basic_ostream<_CharT, _Traits>::__ostream_type& std::basic_ostream<_CharT, _Traits>::operator<<(__ios_type& (*)(__ios_type&)) [with _CharT = char; _Traits = std::char_traits<char>; __ostream_type = std::basic_ostream<char>; __ios_type = std::basic_ios<char>]’
  119 |       operator<<(__ios_type& (*__pf)(__ios_type&))
      |       ^~~~~~~~
/usr/include/c++/13/ostream:119:32: note:   no known conversion for argument 1 from ‘std::__detail::_Node_iterator<std::pair<const int, int>, false, false>’ to ‘std::basic_ostream<char>::__ios_type& (*)(std::basic_ostream<char>::__ios_type&)’ {aka ‘std::basic_ios<char>& (*)(std::basic_ios<char>&)’}
  119 |       operator<<(__ios_type& (*__pf)(__ios_type&))
      |                  ~~~~~~~~~~~~~~^~~~~~~~~~~~~~~~~~
/usr/include/c++/13/ostream:129:7: note: candidate: ‘std::basic_ostream<_CharT, _Traits>::__ostream_type& std::basic_ostream<_CharT, _Traits>::operator<<(std::ios_base& (*)(std::ios_base&)) [with _CharT = char; _Traits = std::char_traits<char>; __ostream_type = std::basic_ostream<char>]’
  129 |       operator<<(ios_base& (*__pf) (ios_base&))
      |       ^~~~~~~~
/usr/include/c++/13/ostream:129:30: note:   no known conversion for argument 1 from ‘std::__detail::_Node_iterator<std::pair<const int, int>, false, false>’ to ‘std::ios_base& (*)(std::ios_base&)’
  129 |       operator<<(ios_base& (*__pf) (ios_base&))
      |                  ~~~~~~~~~~~~^~~~~~~~~~~~~~~~~
/usr/include/c++/13/ostream:168:7: note: candidate: ‘std::basic_ostream<_CharT, _Traits>::__ostream_type& std::basic_ostream<_CharT, _Traits>::operator<<(long int) [with _CharT = char; _Traits = std::char_traits<char>; __ostream_type = std::basic_ostream<char>]’
  168 |       operator<<(long __n)
      |       ^~~~~~~~
/usr/include/c++/13/ostream:168:23: note:   no known conversion for argument 1 from ‘std::__detail::_Node_iterator<std::pair<const int, int>, false, false>’ to ‘long int’
  168 |       operator<<(long __n)
      |                  ~~~~~^~~
/usr/include/c++/13/ostream:172:7: note: candidate: ‘std::basic_ostream<_CharT, _Traits>::__ostream_type& std::basic_ostream<_CharT, _Traits>::operator<<(long unsigned int) [with _CharT = char; _Traits = std::char_traits<char>; __ostream_type = std::basic_ostream<char>]’
  172 |       operator<<(unsigned long __n)
      |       ^~~~~~~~
/usr/include/c++/13/ostream:172:32: note:   no known conversion for argument 1 from ‘std::__detail::_Node_iterator<std::pair<const int, int>, false, false>’ to ‘long unsigned int’
  172 |       operator<<(unsigned long __n)
      |                  ~~~~~~~~~~~~~~^~~
/usr/include/c++/13/ostream:176:7: note: candidate: ‘std::basic_ostream<_CharT, _Traits>::__ostream_type& std::basic_ostream<_CharT, _Traits>::operator<<(bool) [with _CharT = char; _Traits = std::char_traits<char>; __ostream_type = std::basic_ostream<char>]’
  176 |       operator<<(bool __n)
      |       ^~~~~~~~
/usr/include/c++/13/ostream:176:23: note:   no known conversion for argument 1 from ‘std::__detail::_Node_iterator<std::pair<const int, int>, false, false>’ to ‘bool’
  176 |       operator<<(bool __n)
      |                  ~~~~~^~~
In file included from /usr/include/c++/13/ostream:880:
/usr/include/c++/13/bits/ostream.tcc:96:5: note: candidate: ‘std::basic_ostream<_CharT, _Traits>& std::basic_ostream<_CharT, _Traits>::operator<<(short int) [with _CharT = char; _Traits = std::char_traits<char>]’
   96 |     basic_ostream<_CharT, _Traits>::
      |     ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
/usr/include/c++/13/bits/ostream.tcc:97:22: note:   no known conversion for argument 1 from ‘std::__detail::_Node_iterator<std::pair<const int, int>, false, false>’ to ‘short int’
   97 |     operator<<(short __n)
      |                ~~~~~~^~~
/usr/include/c++/13/ostream:183:7: note: candidate: ‘std::basic_ostream<_CharT, _Traits>::__ostream_type& std::basic_ostream<_CharT, _Traits>::operator<<(short unsigned int) [with _CharT = char; _Traits = std::char_traits<char>; __ostream_type = std::basic_ostream<char>]’
  183 |       operator<<(unsigned short __n)
      |       ^~~~~~~~
/usr/include/c++/13/ostream:183:33: note:   no known conversion for argument 1 from ‘std::__detail::_Node_iterator<std::pair<const int, int>, false, false>’ to ‘short unsigned int’
  183 |       operator<<(unsigned short __n)
      |                  ~~~~~~~~~~~~~~~^~~
/usr/include/c++/13/bits/ostream.tcc:110:5: note: candidate: ‘std::basic_ostream<_CharT, _Traits>& std::basic_ostream<_CharT, _Traits>::operator<<(int) [with _CharT = char; _Traits = std::char_traits<char>]’
  110 |     basic_ostream<_CharT, _Traits>::
      |     ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
/usr/include/c++/13/bits/ostream.tcc:111:20: note:   no known conversion for argument 1 from ‘std::__detail::_Node_iterator<std::pair<const int, int>, false, false>’ to ‘int’
  111 |     operator<<(int __n)
      |                ~~~~^~~
/usr/include/c++/13/ostream:194:7: note: candidate: ‘std::basic_ostream<_CharT, _Traits>::__ostream_type& std::basic_ostream<_CharT, _Traits>::operator<<(unsigned int) [with _CharT = char; _Traits = std::char_traits<char>; __ostream_type = std::basic_ostream<char>]’
  194 |       operator<<(unsigned int __n)
      |       ^~~~~~~~
/usr/include/c++/13/ostream:194:31: note:   no known conversion for argument 1 from ‘std::__detail::_Node_iterator<std::pair<const int, int>, false, false>’ to ‘unsigned int’
  194 |       operator<<(unsigned int __n)
      |                  ~~~~~~~~~~~~~^~~
/usr/include/c++/13/ostream:203:7: note: candidate: ‘std::basic_ostream<_CharT, _Traits>::__ostream_type& std::basic_ostream<_CharT, _Traits>::operator<<(long long int) [with _CharT = char; _Traits = std::char_traits<char>; __ostream_type = std::basic_ostream<char>]’
  203 |       operator<<(long long __n)
      |       ^~~~~~~~
/usr/include/c++/13/ostream:203:28: note:   no known conversion for argument 1 from ‘std::__detail::_Node_iterator<std::pair<const int, int>, false, false>’ to ‘long long int’
  203 |       operator<<(long long __n)
      |                  ~~~~~~~~~~^~~
/usr/include/c++/13/ostream:207:7: note: candidate: ‘std::basic_ostream<_CharT, _Traits>::__ostream_type& std::basic_ostream<_CharT, _Traits>::operator<<(long long unsigned int) [with _CharT = char; _Traits = std::char_traits<char>; __ostream_type = std::basic_ostream<char>]’
  207 |       operator<<(unsigned long long __n)
      |       ^~~~~~~~
/usr/include/c++/13/ostream:207:37: note:   no known conversion for argument 1 from ‘std::__detail::_Node_iterator<std::pair<const int, int>, false, false>’ to ‘long long unsigned int’
  207 |       operator<<(unsigned long long __n)
      |                  ~~~~~~~~~~~~~~~~~~~^~~
/usr/include/c++/13/ostream:222:7: note: candidate: ‘std::basic_ostream<_CharT, _Traits>::__ostream_type& std::basic_ostream<_CharT, _Traits>::operator<<(double) [with _CharT = char; _Traits = std::char_traits<char>; __ostream_type = std::basic_ostream<char>]’
  222 |       operator<<(double __f)
      |       ^~~~~~~~
/usr/include/c++/13/ostream:222:25: note:   no known conversion for argument 1 from ‘std::__detail::_Node_iterator<std::pair<const int, int>, false, false>’ to ‘double’
  222 |       operator<<(double __f)
      |                  ~~~~~~~^~~
/usr/include/c++/13/ostream:226:7: note: candidate: ‘std::basic_ostream<_CharT, _Traits>::__ostream_type& std::basic_ostream<_CharT, _Traits>::operator<<(float) [with _CharT = char; _Traits = std::char_traits<char>; __ostream_type = std::basic_ostream<char>]’
  226 |       operator<<(float __f)
      |       ^~~~~~~~
/usr/include/c++/13/ostream:226:24: note:   no known conversion for argument 1 from ‘std::__detail::_Node_iterator<std::pair<const int, int>, false, false>’ to ‘float’
  226 |       operator<<(float __f)
      |                  ~~~~~~^~~
/usr/include/c++/13/ostream:234:7: note: candidate: ‘std::basic_ostream<_CharT, _Traits>::__ostream_type& std::basic_ostream<_CharT, _Traits>::operator<<(long double) [with _CharT = char; _Traits = std::char_traits<char>; __ostream_type = std::basic_ostream<char>]’
  234 |       operator<<(long double __f)
      |       ^~~~~~~~
/usr/include/c++/13/ostream:234:30: note:   no known conversion for argument 1 from ‘std::__detail::_Node_iterator<std::pair<const int, int>, false, false>’ to ‘long double’
  234 |       operator<<(long double __f)
      |                  ~~~~~~~~~~~~^~~
/usr/include/c++/13/ostream:292:7: note: candidate: ‘std::basic_ostream<_CharT, _Traits>::__ostream_type& std::basic_ostream<_CharT, _Traits>::operator<<(const void*) [with _CharT = char; _Traits = std::char_traits<char>; __ostream_type = std::basic_ostream<char>]’
  292 |       operator<<(const void* __p)
      |       ^~~~~~~~
/usr/include/c++/13/ostream:292:30: note:   no known conversion for argument 1 from ‘std::__detail::_Node_iterator<std::pair<const int, int>, false, false>’ to ‘const void*’
  292 |       operator<<(const void* __p)
      |                  ~~~~~~~~~~~~^~~
/usr/include/c++/13/bits/ostream.tcc:124:5: note: candidate: ‘std::basic_ostream<_CharT, _Traits>& std::basic_ostream<_CharT, _Traits>::operator<<(__streambuf_type*) [with _CharT = char; _Traits = std::char_traits<char>; __streambuf_type = std::basic_streambuf<char>]’
  124 |     basic_ostream<_CharT, _Traits>::
      |     ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
/usr/include/c++/13/bits/ostream.tcc:125:34: note:   no known conversion for argument 1 from ‘std::__detail::_Node_iterator<std::pair<const int, int>, false, false>’ to ‘std::basic_ostream<char>::__streambuf_type*’ {aka ‘std::basic_streambuf<char>*’}
  125 |     operator<<(__streambuf_type* __sbin)
      |                ~~~~~~~~~~~~~~~~~~^~~~~~
/usr/include/c++/13/bits/regex.h:1715:5: note: candidate: ‘template<class _Ch_type, class _Ch_traits, class _Bi_iter> std::basic_ostream<_CharT, _Traits>& std::__cxx11::operator<<(std::basic_ostream<_CharT, _Traits>&, const sub_match<_Bi_iter>&)’
 1715 |     operator<<(basic_ostream<_Ch_type, _Ch_traits>& __os,
      |     ^~~~~~~~
/usr/include/c++/13/bits/regex.h:1715:5: note:   template argument deduction/substitution failed:
majoritar.cpp:29:23: note:   ‘std::__detail::_Node_iterator<std::pair<const int, int>, false, false>’ is not derived from ‘const std::__cxx11::sub_match<_Bi_iter>’
   29 |         cout<<"DA "<< maxim;
      |                       ^~~~~
/usr/include/c++/13/bits/basic_string.h:4032:5: note: candidate: ‘template<class _CharT, class _Traits, class _Alloc> std::basic_ostream<_CharT, _Traits>& std::operator<<(basic_ostream<_CharT, _Traits>&, const __cxx11::basic_string<_CharT, _Traits, _Alloc>&)’
 4032 |     operator<<(basic_ostream<_CharT, _Traits>& __os,
      |     ^~~~~~~~
/usr/include/c++/13/bits/basic_string.h:4032:5: note:   template argument deduction/substitution failed:
majoritar.cpp:29:23: note:   ‘std::__detail::_Node_iterator<std::pair<const int, int>, false, false>’ is not derived from ‘const std::__cxx11::basic_string<_CharT, _Traits, _Alloc>’
   29 |         cout<<"DA "<< maxim;
      |                       ^~~~~
/usr/include/c++/13/bitset:1683:5: note: candidate: ‘template<class _CharT, class _Traits, long unsigned int _Nb> std::basic_ostream<_CharT, _Traits>& std::operator<<(basic_ostream<_CharT, _Traits>&, const bitset<_Nb>&)’
 1683 |     operator<<(std::basic_ostream<_CharT, _Traits>& __os,
      |     ^~~~~~~~
/usr/include/c++/13/bitset:1683:5: note:   template argument deduction/substitution failed:
majoritar.cpp:29:23: note:   ‘std::__detail::_Node_iterator<std::pair<const int, int>, false, false>’ is not derived from ‘const std::bitset<_Nb>’
   29 |         cout<<"DA "<< maxim;
      |                       ^~~~~
In file included from /usr/include/c++/13/bits/ios_base.h:46,
                 from /usr/include/c++/13/streambuf:43,
                 from /usr/include/c++/13/bits/streambuf_iterator.h:35,
                 from /usr/include/c++/13/iterator:66,
                 from /usr/include/x86_64-linux-gnu/c++/13/bits/stdc++.h:54:
/usr/include/c++/13/system_error:339:5: note: candidate: ‘template<class _CharT, class _Traits> std::basic_ostream<_CharT, _Traits>& std::operator<<(basic_ostream<_CharT, _Traits>&, const error_code&)’
  339 |     operator<<(basic_ostream<_CharT, _Traits>& __os, const error_code& __e)
      |     ^~~~~~~~
/usr/include/c++/13/system_error:339:5: note:   template argument deduction/substitution failed:
majoritar.cpp:29:23: note:   cannot convert ‘maxim’ (type ‘std::__detail::_Node_iterator<std::pair<const int, int>, false, false>’) to type ‘const std::error_code&’
   29 |         cout<<"DA "<< maxim;
      |                       ^~~~~
/usr/include/c++/13/bits/shared_ptr.h:70:5: note: candidate: ‘template<class _Ch, class _Tr, class _Tp, __gnu_cxx::_Lock_policy _Lp> std::basic_ostream<_CharT, _Traits>& std::operator<<(basic_ostream<_CharT, _Traits>&, const __shared_ptr<_Tp, _Lp>&)’
   70 |     operator<<(std::basic_ostream<_Ch, _Tr>& __os,
      |     ^~~~~~~~
/usr/include/c++/13/bits/shared_ptr.h:70:5: note:   template argument deduction/substitution failed:
majoritar.cpp:29:23: note:   ‘std::__detail::_Node_iterator<std::pair<const int, int>, false, false>’ is not derived from ‘const std::__shared_ptr<_Tp, _Lp>’
   29 |         cout<<"DA "<< maxim;
      |                       ^~~~~
/usr/include/c++/13/ostream:554:5: note: candidate: ‘template<class _CharT, class _Traits> std::basic_ostream<_CharT, _Traits>& std::operator<<(basic_ostream<_CharT, _Traits>&, _CharT)’
  554 |     operator<<(basic_ostream<_CharT, _Traits>& __out, _CharT __c)
      |     ^~~~~~~~
/usr/include/c++/13/ostream:554:5: note:   template argument deduction/substitution failed:
majoritar.cpp:29:23: note:   deduced conflicting types for parameter ‘_CharT’ (‘char’ and ‘std::__detail::_Node_iterator<std::pair<const int, int>, false, false>’)
   29 |         cout<<"DA "<< maxim;
      |                       ^~~~~
/usr/include/c++/13/ostream:564:5: note: candidate: ‘template<class _CharT, class _Traits> std::basic_ostream<_CharT, _Traits>& std::operator<<(basic_ostream<_CharT, _Traits>&, char)’
  564 |     operator<<(basic_ostream<_CharT, _Traits>& __out, char __c)
      |     ^~~~~~~~
/usr/include/c++/13/ostream:564:5: note:   template argument deduction/substitution failed:
majoritar.cpp:29:23: note:   cannot convert ‘maxim’ (type ‘std::__detail::_Node_iterator<std::pair<const int, int>, false, false>’) to type ‘char’
   29 |         cout<<"DA "<< maxim;
      |                       ^~~~~
/usr/include/c++/13/ostream:570:5: note: candidate: ‘template<class _Traits> std::basic_ostream<char, _Traits>& std::operator<<(basic_ostream<char, _Traits>&, char)’
  570 |     operator<<(basic_ostream<char, _Traits>& __out, char __c)
      |     ^~~~~~~~
/usr/include/c++/13/ostream:570:5: note:   template argument deduction/substitution failed:
majoritar.cpp:29:23: note:   cannot convert ‘maxim’ (type ‘std::__detail::_Node_iterator<std::pair<const int, int>, false, false>’) to type ‘char’
   29 |         cout<<"DA "<< maxim;
      |                       ^~~~~
/usr/include/c++/13/ostream:581:5: note: candidate: ‘template<class _Traits> std::basic_ostream<char, _Traits>& std::operator<<(basic_ostream<char, _Traits>&, signed char)’
  581 |     operator<<(basic_ostream<char, _Traits>& __out, signed char __c)
      |     ^~~~~~~~
/usr/include/c++/13/ostream:581:5: note:   template argument deduction/substitution failed:
majoritar.cpp:29:23: note:   cannot convert ‘maxim’ (type ‘std::__detail::_Node_iterator<std::pair<const int, int>, false, false>’) to type ‘signed char’
   29 |         cout<<"DA "<< maxim;
      |                       ^~~~~
/usr/include/c++/13/ostream:586:5: note: candidate: ‘template<class _Traits> std::basic_ostream<char, _Traits>& std::operator<<(basic_ostream<char, _Traits>&, unsigned char)’
  586 |     operator<<(basic_ostream<char, _Traits>& __out, unsigned char __c)
      |     ^~~~~~~~
/usr/include/c++/13/ostream:586:5: note:   template argument deduction/substitution failed:
majoritar.cpp:29:23: note:   cannot convert ‘maxim’ (type ‘std::__detail::_Node_iterator<std::pair<const int, int>, false, false>’) to type ‘unsigned char’
   29 |         cout<<"DA "<< maxim;
      |                       ^~~~~
/usr/include/c++/13/ostream:645:5: note: candidate: ‘template<class _CharT, class _Traits> std::basic_ostream<_CharT, _Traits>& std::operator<<(basic_ostream<_CharT, _Traits>&, const _CharT*)’
  645 |     operator<<(basic_ostream<_CharT, _Traits>& __out, const _CharT* __s)
      |     ^~~~~~~~
/usr/include/c++/13/ostream:645:5: note:   template argument deduction/substitution failed:
majoritar.cpp:29:23: note:   mismatched types ‘const _CharT*’ and ‘std::__detail::_Node_iterator<std::pair<const int, int>, false, false>’
   29 |         cout<<"DA "<< maxim;
      |                       ^~~~~
/usr/include/c++/13/bits/ostream.tcc:307:5: note: candidate: ‘template<class _CharT, class _Traits> std::basic_ostream<_CharT, _Traits>& std::operator<<(basic_ostream<_CharT, _Traits>&, const char*)’
  307 |     operator<<(basic_ostream<_CharT, _Traits>& __out, const char* __s)
      |     ^~~~~~~~
/usr/include/c++/13/bits/ostream.tcc:307:5: note:   template argument deduction/substitution failed:
majoritar.cpp:29:23: note:   cannot convert ‘maxim’ (type ‘std::__detail::_Node_iterator<std::pair<const int, int>, false, false>’) to type ‘const char*’
   29 |         cout<<"DA "<< maxim;
      |                       ^~~~~
/usr/include/c++/13/ostream:662:5: note: candidate: ‘template<class _Traits> std::basic_ostream<char, _Traits>& std::operator<<(basic_ostream<char, _Traits>&, const char*)’
  662 |     operator<<(basic_ostream<char, _Traits>& __out, const char* __s)
      |     ^~~~~~~~
/usr/include/c++/13/ostream:662:5: note:   template argument deduction/substitution failed:
majoritar.cpp:29:23: note:   cannot convert ‘maxim’ (type ‘std::__detail::_Node_iterator<std::pair<const int, int>, false, false>’) to type ‘const char*’
   29 |         cout<<"DA "<< maxim;
      |                       ^~~~~
/usr/include/c++/13/ostream:675:5: note: candidate: ‘template<class _Traits> std::basic_ostream<char, _Traits>& std::operator<<(basic_ostream<char, _Traits>&, const signed char*)’
  675 |     operator<<(basic_ostream<char, _Traits>& __out, const signed char* __s)
      |     ^~~~~~~~
/usr/include/c++/13/ostream:675:5: note:   template argument deduction/substitution failed:
majoritar.cpp:29:23: note:   cannot convert ‘maxim’ (type ‘std::__detail::_Node_iterator<std::pair<const int, int>, false, false>’) to type ‘const signed char*’
   29 |         cout<<"DA "<< maxim;
      |                       ^~~~~
/usr/include/c++/13/ostream:680:5: note: candidate: ‘template<class _Traits> std::basic_ostream<char, _Traits>& std::operator<<(basic_ostream<char, _Traits>&, const unsigned char*)’
  680 |     operator<<(basic_ostream<char, _Traits>& __out, const unsigned char* __s)
      |     ^~~~~~~~
/usr/include/c++/13/ostream:680:5: note:   template argument deduction/substitution failed:
majoritar.cpp:29:23: note:   cannot convert ‘maxim’ (type ‘std::__detail::_Node_iterator<std::pair<const int, int>, false, false>’) to type ‘const unsigned char*’
   29 |         cout<<"DA "<< maxim;
      |                       ^~~~~
/usr/include/c++/13/ostream:801:5: note: candidate: ‘template<class _Ostream, class _Tp> _Ostream&& std::operator<<(_Ostream&&, const _Tp&)’
  801 |     operator<<(_Ostream&& __os, const _Tp& __x)
      |     ^~~~~~~~
/usr/include/c++/13/ostream:801:5: note:   template argument deduction/substitution failed:
/usr/include/c++/13/ostream: In substitution of ‘template<class _Ostream, class _Tp> _Ostream&& std::operator<<(_Ostream&&, const _Tp&) [with _Ostream = std::basic_ostream<char>&; _Tp = std::__detail::_Node_iterator<std::pair<const int, int>, false, false>]’:
majoritar.cpp:29:23:   required from here
/usr/include/c++/13/ostream:801:5: error: no type named ‘type’ in ‘struct std::enable_if<false, void>’
/usr/include/c++/13/complex:558:5: note: candidate: ‘template<class _Tp, class _CharT, class _Traits> std::basic_ostream<_CharT, _Traits>& std::operator<<(basic_ostream<_CharT, _Traits>&, const complex<_Tp>&)’
  558 |     operator<<(basic_ostream<_CharT, _Traits>& __os, const complex<_Tp>& __x)
      |     ^~~~~~~~
/usr/include/c++/13/complex:558:5: note:   template argument deduction/substitution failed:
majoritar.cpp:29:23: note:   ‘std::__detail::_Node_iterator<std::pair<const int, int>, false, false>’ is not derived from ‘const std::complex<_Tp>’
   29 |         cout<<"DA "<< maxim;
      |                       ^~~~~
In file included from /usr/include/x86_64-linux-gnu/c++/13/bits/stdc++.h:143:
/usr/include/c++/13/iomanip:81:5: note: candidate: ‘template<class _CharT, class _Traits> std::basic_ostream<_CharT, _Traits>& std::operator<<(basic_ostream<_CharT, _Traits>&, _Resetiosflags)’
   81 |     operator<<(basic_ostream<_CharT, _Traits>& __os, _Resetiosflags __f)
      |     ^~~~~~~~
/usr/include/c++/13/iomanip:81:5: note:   template argument deduction/substitution failed:
majoritar.cpp:29:23: note:   cannot convert ‘maxim’ (type ‘std::__detail::_Node_iterator<std::pair<const int, int>, false, false>’) to type ‘std::_Resetiosflags’
   29 |         cout<<"DA "<< maxim;
      |                       ^~~~~
/usr/include/c++/13/iomanip:111:5: note: candidate: ‘template<class _CharT, class _Traits> std::basic_ostream<_CharT, _Traits>& std::operator<<(basic_ostream<_CharT, _Traits>&, _Setiosflags)’
  111 |     operator<<(basic_ostream<_CharT, _Traits>& __os, _Setiosflags __f)
      |     ^~~~~~~~
/usr/include/c++/13/iomanip:111:5: note:   template argument deduction/substitution failed:
majoritar.cpp:29:23: note:   cannot convert ‘maxim’ (type ‘std::__detail::_Node_iterator<std::pair<const int, int>, false, false>’) to type ‘std::_Setiosflags’
   29 |         cout<<"DA "<< maxim;
      |                       ^~~~~
/usr/include/c++/13/iomanip:145:5: note: candidate: ‘template<class _CharT, class _Traits> std::basic_ostream<_CharT, _Traits>& std::operator<<(basic_ostream<_CharT, _Traits>&, _Setbase)’
  145 |     operator<<(basic_ostream<_CharT, _Traits>& __os, _Setbase __f)
      |     ^~~~~~~~
/usr/include/c++/13/iomanip:145:5: note:   template argument deduction/substitution failed:
majoritar.cpp:29:23: note:   cannot convert ‘maxim’ (type ‘std::__detail::_Node_iterator<std::pair<const int, int>, false, false>’) to type ‘std::_Setbase’
   29 |         cout<<"DA "<< maxim;
      |                       ^~~~~
/usr/include/c++/13/iomanip:180:5: note: candidate: ‘template<class _CharT, class _Traits> std::basic_ostream<_CharT, _Traits>& std::operator<<(basic_ostream<_CharT, _Traits>&, _Setfill<_CharT>)’
  180 |     operator<<(basic_ostream<_CharT, _Traits>& __os, _Setfill<_CharT> __f)
      |     ^~~~~~~~
/usr/include/c++/13/iomanip:180:5: note:   template argument deduction/substitution failed:
majoritar.cpp:29:23: note:   ‘std::__detail::_Node_iterator<std::pair<const int, int>, false, false>’ is not derived from ‘std::_Setfill<_CharT>’
   29 |         cout<<"DA "<< maxim;
      |                       ^~~~~
/usr/include/c++/13/iomanip:210:5: note: candidate: ‘template<class _CharT, class _Traits> std::basic_ostream<_CharT, _Traits>& std::operator<<(basic_ostream<_CharT, _Traits>&, _Setprecision)’
  210 |     operator<<(basic_ostream<_CharT, _Traits>& __os, _Setprecision __f)
      |     ^~~~~~~~
/usr/include/c++/13/iomanip:210:5: note:   template argument deduction/substitution failed:
majoritar.cpp:29:23: note:   cannot convert ‘maxim’ (type ‘std::__detail::_Node_iterator<std::pair<const int, int>, false, false>’) to type ‘std::_Setprecision’
   29 |         cout<<"DA "<< maxim;
      |                       ^~~~~
/usr/include/c++/13/iomanip:240:5: note: candidate: ‘template<class _CharT, class _Traits> std::basic_ostream<_CharT, _Traits>& std::operator<<(basic_ostream<_CharT, _Traits>&, _Setw)’
  240 |     operator<<(basic_ostream<_CharT, _Traits>& __os, _Setw __f)
      |     ^~~~~~~~
/usr/include/c++/13/iomanip:240:5: note:   template argument deduction/substitution failed:
majoritar.cpp:29:23: note:   cannot convert ‘maxim’ (type ‘std::__detail::_Node_iterator<std::pair<const int, int>, false, false>’) to type ‘std::_Setw’
   29 |         cout<<"DA "<< maxim;
      |                       ^~~~~
/usr/include/c++/13/iomanip:313:5: note: candidate: ‘template<class _CharT, class _Traits, class _MoneyT> std::basic_ostream<_CharT, _Traits>& std::operator<<(basic_ostream<_CharT, _Traits>&, _Put_money<_MoneyT>)’
  313 |     operator<<(basic_ostream<_CharT, _Traits>& __os, _Put_money<_MoneyT> __f)
      |     ^~~~~~~~
/usr/include/c++/13/iomanip:313:5: note:   template argument deduction/substitution failed:
majoritar.cpp:29:23: note:   ‘std::__detail::_Node_iterator<std::pair<const int, int>, false, false>’ is not derived from ‘std::_Put_money<_MoneyT>’
   29 |         cout<<"DA "<< maxim;
      |                       ^~~~~
/usr/include/c++/13/iomanip:365:5: note: candidate: ‘template<class _CharT, class _Traits> std::basic_ostream<_CharT, _Traits>& std::operator<<(basic_ostream<_CharT, _Traits>&, _Put_time<_CharT>)’
  365 |     operator<<(basic_ostream<_CharT, _Traits>& __os, _Put_time<_CharT> __f)
      |     ^~~~~~~~
/usr/include/c++/13/iomanip:365:5: note:   template argument deduction/substitution failed:
majoritar.cpp:29:23: note:   ‘std::__detail::_Node_iterator<std::pair<const int, int>, false, false>’ is not derived from ‘std::_Put_time<_CharT>’
   29 |         cout<<"DA "<< maxim;
      |                       ^~~~~
/usr/include/c++/13/bits/valarray_after.h:413:5: note: candidate: ‘template<class _Dom1, class _Dom2> std::_Expr<std::__detail::_BinClos<std::__shift_left, std::_Expr, std::_Expr, _Dom1, _Dom2>, typename std::__fun<std::__shift_left, typename _Dom1::value_type>::result_type> std::operator<<(const _Expr<_Dom1, typename _Dom1::value_type>&, const _Expr<_Dom2, typename _Dom2::value_type>&)’
  413 |     _DEFINE_EXPR_BINARY_OPERATOR(<<, struct std::__shift_left)
      |     ^~~~~~~~~~~~~~~~~~~~~~~~~~~~
/usr/include/c++/13/bits/valarray_after.h:413:5: note:   template argument deduction/substitution failed:
majoritar.cpp:29:23: note:   ‘std::basic_ostream<char>’ is not derived from ‘const std::_Expr<_Dom1, typename _Dom1::value_type>’
   29 |         cout<<"DA "<< maxim;
      |                       ^~~~~
/usr/include/c++/13/bits/valarray_after.h:413:5: note: candidate: ‘template<class _Dom> std::_Expr<std::__detail::_BinClos<std::__shift_left, std::_Expr, std::_Constant, _Dom, typename _Dom::value_type>, typename std::__fun<std::__shift_left, typename _Dom1::value_type>::result_type> std::operator<<(const _Expr<_Dom1, typename _Dom1::value_type>&, const typename _Dom::value_type&)’
  413 |     _DEFINE_EXPR_BINARY_OPERATOR(<<, struct std::__shift_left)
      |     ^~~~~~~~~~~~~~~~~~~~~~~~~~~~
/usr/include/c++/13/bits/valarray_after.h:413:5: note:   template argument deduction/substitution failed:
majoritar.cpp:29:23: note:   ‘std::basic_ostream<char>’ is not derived from ‘const std::_Expr<_Dom1, typename _Dom1::value_type>’
   29 |         cout<<"DA "<< maxim;
      |                       ^~~~~
/usr/include/c++/13/bits/valarray_after.h:413:5: note: candidate: ‘template<class _Dom> std::_Expr<std::__detail::_BinClos<std::__shift_left, std::_Constant, std::_Expr, typename _Dom::value_type, _Dom>, typename std::__fun<std::__shift_left, typename _Dom1::value_type>::result_type> std::operator<<(const typename _Dom::value_type&, const _Expr<_Dom1, typename _Dom1::value_type>&)’
  413 |     _DEFINE_

Cum funcționează evaluarea?

www.pbinfo.ro permite evaluarea a două tipuri de probleme:

  • probleme la care rezolvarea presupune scrierea unui program complet
  • probleme la care rezolvarea presupune scrierea unei secvențe de program - câteva instrucțiuni, o listă de declarații, una sau mai multe funcții, etc.

Problema Majoritar face parte din prima categorie. Soluția propusă de tine va fi evaluată astfel:

  • Programul sursă este compilat folosind compilatorul corespunzător. Dacă în urma compilării se obțin erori sau avertismente, acestea sunt afișate în această pagină.
  • Dacă programul a fost compilat, executabilul obținut va fi rulat, furnizându-i-se unul sau mai multe seturi de date de intrare, în concordanță cu restricțiile specifice problemei. Pentru fiecare set de date se obține un anumit punctaj, în raport cu corectitudinea soluției tale.

Suma punctajelor acordate pe testele utilizate pentru verificare este 100. Astfel, soluția ta poate obține cel mult 100 de puncte, caz în care se poate considera corectă.

Du-te sus!