QOJ.ac

QOJ

ID题目提交者结果用时内存语言文件大小提交时间测评时间
#326499#6669. MapaZhangYiDeCompile Error//C++232.3kb2024-02-13 11:49:292024-02-13 11:49:30

詳細信息

answer.code: In function ‘int main()’:
answer.code:59:34: error: no match for ‘operator&’ (operand types are ‘std::basic_ostream<char>’ and ‘int’)
   59 |                 cout << (v >> i) & 1;
      |                 ~~~~~~~~~~~~~~~~ ^ ~
      |                      |             |
      |                      |             int
      |                      std::basic_ostream<char>
answer.code:59:34: note: candidate: ‘operator&(int, int)’ (built-in)
   59 |                 cout << (v >> i) & 1;
      |                 ~~~~~~~~~~~~~~~~~^~~
answer.code:59:34: note:   no known conversion for argument 1 from ‘std::basic_ostream<char>’ to ‘int’
In file included from /usr/include/x86_64-linux-gnu/c++/11/bits/stdc++.h:66,
                 from answer.code:1:
/usr/include/c++/11/bitset:1435:5: note: candidate: ‘template<long unsigned int _Nb> std::bitset<_Nb> std::operator&(const std::bitset<_Nb>&, const std::bitset<_Nb>&)’
 1435 |     operator&(const bitset<_Nb>& __x, const bitset<_Nb>& __y) _GLIBCXX_NOEXCEPT
      |     ^~~~~~~~
/usr/include/c++/11/bitset:1435:5: note:   template argument deduction/substitution failed:
answer.code:59:36: note:   ‘std::basic_ostream<char>’ is not derived from ‘const std::bitset<_Nb>’
   59 |                 cout << (v >> i) & 1;
      |                                    ^
In file included from /usr/include/c++/11/valarray:603,
                 from /usr/include/x86_64-linux-gnu/c++/11/bits/stdc++.h:95,
                 from answer.code:1:
/usr/include/c++/11/bits/valarray_after.h:411:5: note: candidate: ‘template<class _Dom1, class _Dom2> std::_Expr<std::__detail::_BinClos<std::__bitwise_and, std::_Expr, std::_Expr, _Dom1, _Dom2>, typename std::__fun<std::__bitwise_and, typename _Dom1::value_type>::result_type> std::operator&(const std::_Expr<_Dom1, typename _Dom1::value_type>&, const std::_Expr<_Dom2, typename _Dom2::value_type>&)’
  411 |     _DEFINE_EXPR_BINARY_OPERATOR(&, struct std::__bitwise_and)
      |     ^~~~~~~~~~~~~~~~~~~~~~~~~~~~
/usr/include/c++/11/bits/valarray_after.h:411:5: note:   template argument deduction/substitution failed:
answer.code:59:36: note:   ‘std::basic_ostream<char>’ is not derived from ‘const std::_Expr<_Dom1, typename _Dom1::value_type>’
   59 |                 cout << (v >> i) & 1;
      |                                    ^
In file included from /usr/include/c++/11/valarray:603,
                 from /usr/include/x86_64-linux-gnu/c++/11/bits/stdc++.h:95,
                 from answer.code:1:
/usr/include/c++/11/bits/valarray_after.h:411:5: note: candidate: ‘template<class _Dom> std::_Expr<std::__detail::_BinClos<std::__bitwise_and, std::_Expr, std::_Constant, _Dom, typename _Dom::value_type>, typename std::__fun<std::__bitwise_and, typename _Dom1::value_type>::result_type> std::operator&(const std::_Expr<_Dom1, typename _Dom1::value_type>&, const typename _Dom::value_type&)’
  411 |     _DEFINE_EXPR_BINARY_OPERATOR(&, struct std::__bitwise_and)
      |     ^~~~~~~~~~~~~~~~~~~~~~~~~~~~
/usr/include/c++/11/bits/valarray_after.h:411:5: note:   template argument deduction/substitution failed:
answer.code:59:36: note:   ‘std::basic_ostream<char>’ is not derived from ‘const std::_Expr<_Dom1, typename _Dom1::value_type>’
   59 |                 cout << (v >> i) & 1;
      |                                    ^
In file included from /usr/include/c++/11/valarray:603,
                 from /usr/include/x86_64-linux-gnu/c++/11/bits/stdc++.h:95,
                 from answer.code:1:
/usr/include/c++/11/bits/valarray_after.h:411:5: note: candidate: ‘template<class _Dom> std::_Expr<std::__detail::_BinClos<std::__bitwise_and, std::_Constant, std::_Expr, typename _Dom::value_type, _Dom>, typename std::__fun<std::__bitwise_and, typename _Dom1::value_type>::result_type> std::operator&(const typename _Dom::value_type&, const std::_Expr<_Dom1, typename _Dom1::value_type>&)’
  411 |     _DEFINE_EXPR_BINARY_OPERATOR(&, struct std::__bitwise_and)
      |     ^~~~~~~~~~~~~~~~~~~~~~~~~~~~
/usr/include/c++/11/bits/valarray_after.h:411:5: note:   template argument deduction/substitution failed:
answer.code:59:36: note:   mismatched types ‘const std::_Expr<_Dom1, typename _Dom1::value_type>’ and ‘int’
   59 |                 cout << (v >> i) & 1;
      |                                    ^
In file included from /usr/include/c++/11/valarray:603,
                 from /usr/include/x86_64-linux-gnu/c++/11/bits/stdc++.h:95,
                 from answer.code:1:
/usr/include/c++/11/bits/valarray_after.h:411:5: note: candidate: ‘template<class _Dom> std::_Expr<std::__detail::_BinClos<std::__bitwise_and, std::_Expr, std::_ValArray, _Dom, typename _Dom::value_type>, typename std::__fun<std::__bitwise_and, typename _Dom1::value_type>::result_type> std::operator&(const std::_Expr<_Dom1, typename _Dom1::value_type>&, const std::valarray<typename _Dom::value_type>&)’
  411 |     _DEFINE_EXPR_BINARY_OPERATOR(&, struct std::__bitwise_and)
      |     ^~~~~~~~~~~~~~~~~~~~~~~~~~~~
/usr/in...