mushrooms.cpp: In function 'int count_mushrooms(int)':
mushrooms.cpp:316:31: error: no match for 'operator%' (operand types are 'std::vector<int>' and 'int')
316 | if (p % 2) tr.PB(p[8]);
| ~ ^ ~
| | |
| | int
| std::vector<int>
In file included from /usr/include/c++/9/valarray:603,
from /usr/include/x86_64-linux-gnu/c++/9/bits/stdc++.h:95,
from mushrooms.cpp:1:
/usr/include/c++/9/bits/valarray_after.h:409:5: note: candidate: 'template<class _Dom1, class _Dom2> std::_Expr<std::__detail::_BinClos<std::__modulus, std::_Expr, std::_Expr, _Dom1, _Dom2>, typename std::__fun<std::__modulus, typename _Dom1::value_type>::result_type> std::operator%(const std::_Expr<_Dom1, typename _Dom1::value_type>&, const std::_Expr<_Dom2, typename _Dom2::value_type>&)'
409 | _DEFINE_EXPR_BINARY_OPERATOR(%, __modulus)
| ^~~~~~~~~~~~~~~~~~~~~~~~~~~~
/usr/include/c++/9/bits/valarray_after.h:409:5: note: template argument deduction/substitution failed:
mushrooms.cpp:316:33: note: 'std::vector<int>' is not derived from 'const std::_Expr<_Dom1, typename _Dom1::value_type>'
316 | if (p % 2) tr.PB(p[8]);
| ^
In file included from /usr/include/c++/9/valarray:603,
from /usr/include/x86_64-linux-gnu/c++/9/bits/stdc++.h:95,
from mushrooms.cpp:1:
/usr/include/c++/9/bits/valarray_after.h:409:5: note: candidate: 'template<class _Dom> std::_Expr<std::__detail::_BinClos<std::__modulus, std::_Expr, std::_Constant, _Dom, typename _Dom::value_type>, typename std::__fun<std::__modulus, typename _Dom1::value_type>::result_type> std::operator%(const std::_Expr<_Dom1, typename _Dom1::value_type>&, const typename _Dom::value_type&)'
409 | _DEFINE_EXPR_BINARY_OPERATOR(%, __modulus)
| ^~~~~~~~~~~~~~~~~~~~~~~~~~~~
/usr/include/c++/9/bits/valarray_after.h:409:5: note: template argument deduction/substitution failed:
mushrooms.cpp:316:33: note: 'std::vector<int>' is not derived from 'const std::_Expr<_Dom1, typename _Dom1::value_type>'
316 | if (p % 2) tr.PB(p[8]);
| ^
In file included from /usr/include/c++/9/valarray:603,
from /usr/include/x86_64-linux-gnu/c++/9/bits/stdc++.h:95,
from mushrooms.cpp:1:
/usr/include/c++/9/bits/valarray_after.h:409:5: note: candidate: 'template<class _Dom> std::_Expr<std::__detail::_BinClos<std::__modulus, std::_Constant, std::_Expr, typename _Dom::value_type, _Dom>, typename std::__fun<std::__modulus, typename _Dom1::value_type>::result_type> std::operator%(const typename _Dom::value_type&, const std::_Expr<_Dom1, typename _Dom1::value_type>&)'
409 | _DEFINE_EXPR_BINARY_OPERATOR(%, __modulus)
| ^~~~~~~~~~~~~~~~~~~~~~~~~~~~
/usr/include/c++/9/bits/valarray_after.h:409:5: note: template argument deduction/substitution failed:
mushrooms.cpp:316:33: note: mismatched types 'const std::_Expr<_Dom1, typename _Dom1::value_type>' and 'int'
316 | if (p % 2) tr.PB(p[8]);
| ^
In file included from /usr/include/c++/9/valarray:603,
from /usr/include/x86_64-linux-gnu/c++/9/bits/stdc++.h:95,
from mushrooms.cpp:1:
/usr/include/c++/9/bits/valarray_after.h:409:5: note: candidate: 'template<class _Dom> std::_Expr<std::__detail::_BinClos<std::__modulus, std::_Expr, std::_ValArray, _Dom, typename _Dom::value_type>, typename std::__fun<std::__modulus, typename _Dom1::value_type>::result_type> std::operator%(const std::_Expr<_Dom1, typename _Dom1::value_type>&, const std::valarray<typename _Dom::value_type>&)'
409 | _DEFINE_EXPR_BINARY_OPERATOR(%, __modulus)
| ^~~~~~~~~~~~~~~~~~~~~~~~~~~~
/usr/include/c++/9/bits/valarray_after.h:409:5: note: template argument deduction/substitution failed:
mushrooms.cpp:316:33: note: 'std::vector<int>' is not derived from 'const std::_Expr<_Dom1, typename _Dom1::value_type>'
316 | if (p % 2) tr.PB(p[8]);
| ^
In file included from /usr/include/c++/9/valarray:603,
from /usr/include/x86_64-linux-gnu/c++/9/bits/stdc++.h:95,
from mushrooms.cpp:1:
/usr/include/c++/9/bits/valarray_after.h:409:5: note: candidate: 'template<class _Dom> std::_Expr<std::__detail::_BinClos<std::__modulus, std::_ValArray, std::_Expr, typename _Dom::value_type, _Dom>, typename std::__fun<std::__modulus, typename _Dom1::value_type>::result_type> std::operator%(const std::valarray<typename _Dom::value_type>&, const std::_Expr<_Dom1, typename _Dom1::value_type>&)'
409 | _DEFINE_EXPR_BINARY_OPERATOR(%, __modulus)
| ^~~~~~~~~~~~~~~~~~~~~~~~~~~~
/usr/include/c++/9/bits/valarray_after.h:409:5: note: template argument deduction/substitution failed:
mushrooms.cpp:316:33: note: mismatched types 'const std::_Expr<_Dom1, typename _Dom1::value_type>' and 'int'
316 | if (p % 2) tr.PB(p[8]);
| ^
In file included from /usr/include/x86_64-linux-gnu/c++/9/bits/stdc++.h:95,
from mushrooms.cpp:1:
/usr/include/c++/9/valarray:1189:1: note: candidate: 'template<class _Tp> std::_Expr<std::__detail::_BinClos<std::__modulus, std::_ValArray, std::_ValArray, _Tp, _Tp>, typename std::__fun<std::__modulus, _Tp>::result_type> std::operator%(const std::valarray<_Tp>&, const std::valarray<_Tp>&)'
1189 | _DEFINE_BINARY_OPERATOR(%, __modulus)
| ^~~~~~~~~~~~~~~~~~~~~~~
/usr/include/c++/9/valarray:1189:1: note: template argument deduction/substitution failed:
mushrooms.cpp:316:33: note: 'std::vector<int>' is not derived from 'const std::valarray<_Tp>'
316 | if (p % 2) tr.PB(p[8]);
| ^
In file included from /usr/include/x86_64-linux-gnu/c++/9/bits/stdc++.h:95,
from mushrooms.cpp:1:
/usr/include/c++/9/valarray:1189:1: note: candidate: 'template<class _Tp> std::_Expr<std::__detail::_BinClos<std::__modulus, std::_ValArray, std::_Constant, _Tp, _Tp>, typename std::__fun<std::__modulus, _Tp>::result_type> std::operator%(const std::valarray<_Tp>&, const typename std::valarray<_Tp>::value_type&)'
1189 | _DEFINE_BINARY_OPERATOR(%, __modulus)
| ^~~~~~~~~~~~~~~~~~~~~~~
/usr/include/c++/9/valarray:1189:1: note: template argument deduction/substitution failed:
mushrooms.cpp:316:33: note: 'std::vector<int>' is not derived from 'const std::valarray<_Tp>'
316 | if (p % 2) tr.PB(p[8]);
| ^
In file included from /usr/include/x86_64-linux-gnu/c++/9/bits/stdc++.h:95,
from mushrooms.cpp:1:
/usr/include/c++/9/valarray:1189:1: note: candidate: 'template<class _Tp> std::_Expr<std::__detail::_BinClos<std::__modulus, std::_Constant, std::_ValArray, _Tp, _Tp>, typename std::__fun<std::__modulus, _Tp>::result_type> std::operator%(const typename std::valarray<_Tp>::value_type&, const std::valarray<_Tp>&)'
1189 | _DEFINE_BINARY_OPERATOR(%, __modulus)
| ^~~~~~~~~~~~~~~~~~~~~~~
/usr/include/c++/9/valarray:1189:1: note: template argument deduction/substitution failed:
mushrooms.cpp:316:33: note: mismatched types 'const std::valarray<_Tp>' and 'int'
316 | if (p % 2) tr.PB(p[8]);
| ^
mushrooms.cpp:319:31: error: no match for 'operator<=' (operand types are 'std::vector<int>' and 'int')
319 | if (p <= 2) {tr.PB(p[1]); tl.PB(p[3]); tl.PB(p[6]);}
| ~ ^~ ~
| | |
| | int
| std::vector<int>
In file included from /usr/include/c++/9/regex:62,
from /usr/include/x86_64-linux-gnu/c++/9/bits/stdc++.h:110,
from mushrooms.cpp:1:
/usr/include/c++/9/bits/regex.h:1059:5: note: candidate: 'template<class _BiIter> bool std::__cxx11::operator<=(const std::__cxx11::sub_match<_BiIter>&, const std::__cxx11::sub_match<_BiIter>&)'
1059 | operator<=(const sub_match<_BiIter>& __lhs, const sub_match<_BiIter>& __rhs)
| ^~~~~~~~
/usr/include/c++/9/bits/regex.h:1059:5: note: template argument deduction/substitution failed:
mushrooms.cpp:319:34: note: 'std::vector<int>' is not derived from 'const std::__cxx11::sub_match<_BiIter>'
319 | if (p <= 2) {tr.PB(p[1]); tl.PB(p[3]); tl.PB(p[6]);}
| ^
In file included from /usr/include/c++/9/regex:62,
from /usr/include/x86_64-linux-gnu/c++/9/bits/stdc++.h:110,
from mushrooms.cpp:1:
/usr/include/c++/9/bits/regex.h:1160:5: note: candidate: 'template<class _Bi_iter, class _Ch_traits, class _Ch_alloc> bool std::__cxx11::operator<=(std::__cxx11::__sub_match_string<_Bi_iter, _Ch_traits, _Ch_alloc>&, const std::__cxx11::sub_match<_BiIter>&)'
1160 | operator<=(const __sub_match_string<_Bi_iter, _Ch_traits, _Ch_alloc>& __lhs,
| ^~~~~~~~
/usr/include/c++/9/bits/regex.h:1160:5: note: template argument deduction/substitution failed:
mushrooms.cpp:319:34: note: 'std::vector<int>' is not derived from 'std::__cxx11::__sub_match_string<_Bi_iter, _Ch_traits, _Ch_alloc>'
319 | if (p <= 2) {tr.PB(p[1]); tl.PB(p[3]); tl.PB(p[6]);}
| ^
In file included from /usr/include/c++/9/regex:62,
from /usr/include/x86_64-linux-gnu/c++/9/bits/stdc++.h:110,
from mushrooms.cpp:1:
/usr/include/c++/9/bits/regex.h:1234:5: note: candidate: 'template<class _Bi_iter, class _Ch_traits, class _Ch_alloc> bool std::__cxx11::operator<=(const std::__cxx11::sub_match<_BiIter>&, std::__cxx11::__sub_match_string<_Bi_iter, _Ch_traits, _Ch_alloc>&)'
1234 | operator<=(const sub_match<_Bi_iter>& __lhs,
| ^~~~~~~~
/usr/include/c++/9/bits/regex.h:1234:5: note: template argument deduction/substitution failed:
mushrooms.cpp:319:34: note: 'std::vector<int>' is not derived from 'const std::__cxx11::sub_match<_BiIter>'
319 | if (p <= 2) {tr.PB(p[1]); tl.PB(p[3]); tl.PB(p[6]);}
| ^
In file included from /usr/include/c++/9/regex:62,
from /usr/include/x86_64-linux-gnu/c++/9/bits/stdc++.h:110,
from mushrooms.cpp:1:
/usr/include/c++/9/bits/regex.h:1308:5: note: candidate: 'template<class _Bi_iter> bool std::__cxx11::operator<=(const typename std::iterator_traits<_Iter>::value_type*, const std::__cxx11::sub_match<_BiIter>&)'
1308 | operator<=(typename iterator_traits<_Bi_iter>::value_type const* __lhs,
| ^~~~~~~~
/usr/include/c++/9/bits/regex.h:1308:5: note: template argument deduction/substitution failed:
mushrooms.cpp:319:34: note: mismatched types 'const std::__cxx11::sub_match<_BiIter>' and 'int'
319 | if (p <= 2) {tr.PB(p[1]); tl.PB(p[3]); tl.PB(p[6]);}
| ^
In file included from /usr/include/c++/9/regex:62,
from /usr/include/x86_64-linux-gnu/c++/9/bits/stdc++.h:110,
from mushrooms.cpp:1:
/usr/include/c++/9/bits/regex.h:1382:5: note: candidate: 'template<class _Bi_iter> bool std::__cxx11::operator<=(const std::__cxx11::sub_match<_BiIter>&, const typename std::iterator_traits<_Iter>::value_type*)'
1382 | operator<=(const sub_match<_Bi_iter>& __lhs,
| ^~~~~~~~
/usr/include/c++/9/bits/regex.h:1382:5: note: template argument deduction/substitution failed:
mushrooms.cpp:319:34: note: 'std::vector<int>' is not derived from 'const std::__cxx11::sub_match<_BiIter>'
319 | if (p <= 2) {tr.PB(p[1]); tl.PB(p[3]); tl.PB(p[6]);}
| ^
In file included from /usr/include/c++/9/regex:62,
from /usr/include/x86_64-linux-gnu/c++/9/bits/stdc++.h:110,
from mushrooms.cpp:1:
/usr/include/c++/9/bits/regex.h:1460:5: note: candidate: 'template<class _Bi_iter> bool std::__cxx11::operator<=(const typename std::iterator_traits<_Iter>::value_type&, const std::__cxx11::sub_match<_BiIter>&)'
1460 | operator<=(typename iterator_traits<_Bi_iter>::value_type const& __lhs,
| ^~~~~~~~
/usr/include/c++/9/bits/regex.h:1460:5: note: template argument deduction/substitution failed:
mushrooms.cpp:319:34: note: mismatched types 'const std::__cxx11::sub_match<_BiIter>' and 'int'
319 | if (p <= 2) {tr.PB(p[1]); tl.PB(p[3]); tl.PB(p[6]);}
| ^
In file included from /usr/include/c++/9/regex:62,
from /usr/include/x86_64-linux-gnu/c++/9/bits/stdc++.h:110,
from mushrooms.cpp:1:
/usr/include/c++/9/bits/regex.h:1538:5: note: candidate: 'template<class _Bi_iter> bool std::__cxx11::operator<=(const std::__cxx11::sub_match<_BiIter>&, const typename std::iterator_traits<_Iter>::value_type&)'
1538 | operator<=(const sub_match<_Bi_iter>& __lhs,
| ^~~~~~~~
/usr/include/c++/9/bits/regex.h:1538:5: note: template argument deduction/substitution failed:
mushrooms.cpp:319:34: note: 'std::vector<int>' is not derived from 'const std::__cxx11::sub_match<_BiIter>'
319 | if (p <= 2) {tr.PB(p[1]); tl.PB(p[3]); tl.PB(p[6]);}
| ^
In file included from /usr/include/c++/9/bits/stl_algobase.h:64,
from /usr/include/c++/9/bits/char_traits.h:39,
from /usr/include/c++/9/ios:40,
from /usr/include/c++/9/istream:38,
from /usr/include/c++/9/sstream:38,
from /usr/include/c++/9/complex:45,
from /usr/include/c++/9/ccomplex:39,
from /usr/include/x86_64-linux-gnu/c++/9/bits/stdc++.h:54,
from mushrooms.cpp:1:
/usr/include/c++/9/bits/stl_pair.h:473:5: note: candidate: 'template<class _T1, class _T2> constexpr bool std::operator<=(const std::pair<_T1, _T2>&, const std::pair<_T1, _T2>&)'
473 | operator<=(const pair<_T1, _T2>& __x, const pair<_T1, _T2>& __y)
| ^~~~~~~~
/usr/include/c++/9/bits/stl_pair.h:473:5: note: template argument deduction/substitution failed:
mushrooms.cpp:319:34: note: 'std::vector<int>' is not derived from 'const std::pair<_T1, _T2>'
319 | if (p <= 2) {tr.PB(p[1]); tl.PB(p[3]); tl.PB(p[6]);}
| ^
In file included from /usr/include/c++/9/bits/stl_algobase.h:67,
from /usr/include/c++/9/bits/char_traits.h:39,
from /usr/include/c++/9/ios:40,
from /usr/include/c++/9/istream:38,
from /usr/include/c++/9/sstream:38,
from /usr/include/c++/9/complex:45,
from /usr/include/c++/9/ccomplex:39,
from /usr/include/x86_64-linux-gnu/c++/9/bits/stdc++.h:54,
from mushrooms.cpp:1:
/usr/include/c++/9/bits/stl_iterator.h:349:5: note: candidate: 'template<class _Iterator> bool std::operator<=(const std::reverse_iterator<_Iterator>&, const std::reverse_iterator<_Iterator>&)'
349 | operator<=(const reverse_iterator<_Iterator>& __x,
| ^~~~~~~~
/usr/include/c++/9/bits/stl_iterator.h:349:5: note: template argument deduction/substitution failed:
mushrooms.cpp:319:34: note: 'std::vector<int>' is not derived from 'const std::reverse_iterator<_Iterator>'
319 | if (p <= 2) {tr.PB(p[1]); tl.PB(p[3]); tl.PB(p[6]);}
| ^
In file included from /usr/include/c++/9/bits/stl_algobase.h:67,
from /usr/include/c++/9/bits/char_traits.h:39,
from /usr/include/c++/9/ios:40,
from /usr/include/c++/9/istream:38,
from /usr/include/c++/9/sstream:38,
from /usr/include/c++/9/complex:45,
from /usr/include/c++/9/ccomplex:39,
from /usr/include/x86_64-linux-gnu/c++/9/bits/stdc++.h:54,
from mushrooms.cpp:1:
/usr/include/c++/9/bits/stl_iterator.h:387:5: note: candidate: 'template<class _IteratorL, class _IteratorR> bool std::operator<=(const std::reverse_iterator<_Iterator>&, const std::reverse_iterator<_IteratorR>&)'
387 | operator<=(const reverse_iterator<_IteratorL>& __x,
| ^~~~~~~~
/usr/include/c++/9/bits/stl_iterator.h:387:5: note: template argument deduction/substitution failed:
mushrooms.cpp:319:34: note: 'std::vector<int>' is not derived from 'const std::reverse_iterator<_Iterator>'
319 | if (p <= 2) {tr.PB(p[1]); tl.PB(p[3]); tl.PB(p[6]);}
| ^
In file included from /usr/include/c++/9/bits/stl_algobase.h:67,
from /usr/include/c++/9/bits/char_traits.h:39,
from /usr/include/c++/9/ios:40,
from /usr/include/c++/9/istream:38,
from /usr/include/c++/9/sstream:38,
from /usr/include/c++/9/complex:45,
from /usr/include/c++/9/ccomplex:39,
from /usr/include/x86_64-linux-gnu/c++/9/bits/stdc++.h:54,
from mushrooms.cpp:1:
/usr/include/c++/9/bits/stl_iterator.h:1175:5: note: candidate: 'template<class _IteratorL, class _IteratorR> bool std::operator<=(const std::move_iterator<_IteratorL>&, const std::move_iterator<_IteratorR>&)'
1175 | operator<=(const move_iterator<_IteratorL>& __x,
| ^~~~~~~~
/usr/include/c++/9/bits/stl_iterator.h:1175:5: note: template argument deduction/substitution failed:
mushrooms.cpp:319:34: note: 'std::vector<int>' is not derived from 'const std::move_iterator<_IteratorL>'
319 | if (p <= 2) {tr.PB(p[1]); tl.PB(p[3]); tl.PB(p[6]);}
| ^
In file included from /usr/include/c++/9/bits/stl_algobase.h:67,
from /usr/include/c++/9/bits/char_traits.h:39,
from /usr/include/c++/9/ios:40,
from /usr/include/c++/9/istream:38,
from /usr/include/c++/9/sstream:38,
from /usr/include/c++/9/complex:45,
from /usr/include/c++/9/ccomplex:39,
from /usr/include/x86_64-linux-gnu/c++/9/bits/stdc++.h:54,
from mushrooms.cpp:1:
/usr/include/c++/9/bits/stl_iterator.h:1181:5: note: candidate: 'template<class _Iterator> bool std::operator<=(const std::move_iterator<_IteratorL>&, const std::move_iterator<_Iterato