QOJ.ac

QOJ

ID题目提交者结果用时内存语言文件大小提交时间测评时间
#153563#141. 8 染色hyforcesCompile Error//C++201.6kb2023-08-30 11:32:422023-08-30 11:32:43

详细

Bob.code: In function ‘std::vector<int> Bob(int, int, std::vector<int>, std::vector<int>, std::vector<int>)’:
Bob.code:11:63: error: no match for ‘operator*’ (operand types are ‘int’ and ‘std::vector<int>’)
   11 |     for(int a=0,i=0;a<N;++a)if(adj[a].size()>=8)ic[a]=adj[i]+2*adj[i+1];
      |                                                              ~^~~~~~~~~
      |                                                              |        |
      |                                                              int      std::vector<int>
In file included from /usr/include/c++/11/ccomplex:39,
                 from /usr/include/x86_64-linux-gnu/c++/11/bits/stdc++.h:54,
                 from Bob.code:1:
/usr/include/c++/11/complex:392:5: note: candidate: ‘template<class _Tp> constexpr std::complex<_Tp> std::operator*(const std::complex<_Tp>&, const std::complex<_Tp>&)’
  392 |     operator*(const complex<_Tp>& __x, const complex<_Tp>& __y)
      |     ^~~~~~~~
/usr/include/c++/11/complex:392:5: note:   template argument deduction/substitution failed:
Bob.code:11:71: note:   mismatched types ‘const std::complex<_Tp>’ and ‘int’
   11 |     for(int a=0,i=0;a<N;++a)if(adj[a].size()>=8)ic[a]=adj[i]+2*adj[i+1];
      |                                                                       ^
In file included from /usr/include/c++/11/ccomplex:39,
                 from /usr/include/x86_64-linux-gnu/c++/11/bits/stdc++.h:54,
                 from Bob.code:1:
/usr/include/c++/11/complex:401:5: note: candidate: ‘template<class _Tp> constexpr std::complex<_Tp> std::operator*(const std::complex<_Tp>&, const _Tp&)’
  401 |     operator*(const complex<_Tp>& __x, const _Tp& __y)
      |     ^~~~~~~~
/usr/include/c++/11/complex:401:5: note:   template argument deduction/substitution failed:
Bob.code:11:71: note:   mismatched types ‘const std::complex<_Tp>’ and ‘int’
   11 |     for(int a=0,i=0;a<N;++a)if(adj[a].size()>=8)ic[a]=adj[i]+2*adj[i+1];
      |                                                                       ^
In file included from /usr/include/c++/11/ccomplex:39,
                 from /usr/include/x86_64-linux-gnu/c++/11/bits/stdc++.h:54,
                 from Bob.code:1:
/usr/include/c++/11/complex:410:5: note: candidate: ‘template<class _Tp> constexpr std::complex<_Tp> std::operator*(const _Tp&, const std::complex<_Tp>&)’
  410 |     operator*(const _Tp& __x, const complex<_Tp>& __y)
      |     ^~~~~~~~
/usr/include/c++/11/complex:410:5: note:   template argument deduction/substitution failed:
Bob.code:11:71: note:   ‘std::vector<int>’ is not derived from ‘const std::complex<_Tp>’
   11 |     for(int a=0,i=0;a<N;++a)if(adj[a].size()>=8)ic[a]=adj[i]+2*adj[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 Bob.code:1:
/usr/include/c++/11/bits/valarray_after.h:407:5: note: candidate: ‘template<class _Dom1, class _Dom2> std::_Expr<std::__detail::_BinClos<std::__multiplies, std::_Expr, std::_Expr, _Dom1, _Dom2>, typename std::__fun<std::__multiplies, typename _Dom1::value_type>::result_type> std::operator*(const std::_Expr<_Dom1, typename _Dom1::value_type>&, const std::_Expr<_Dom2, typename _Dom2::value_type>&)’
  407 |     _DEFINE_EXPR_BINARY_OPERATOR(*, struct std::__multiplies)
      |     ^~~~~~~~~~~~~~~~~~~~~~~~~~~~
/usr/include/c++/11/bits/valarray_after.h:407:5: note:   template argument deduction/substitution failed:
Bob.code:11:71: note:   mismatched types ‘const std::_Expr<_Dom1, typename _Dom1::value_type>’ and ‘int’
   11 |     for(int a=0,i=0;a<N;++a)if(adj[a].size()>=8)ic[a]=adj[i]+2*adj[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 Bob.code:1:
/usr/include/c++/11/bits/valarray_after.h:407:5: note: candidate: ‘template<class _Dom> std::_Expr<std::__detail::_BinClos<std::__multiplies, std::_Expr, std::_Constant, _Dom, typename _Dom::value_type>, typename std::__fun<std::__multiplies, typename _Dom1::value_type>::result_type> std::operator*(const std::_Expr<_Dom1, typename _Dom1::value_type>&, const typename _Dom::value_type&)’
  407 |     _DEFINE_EXPR_BINARY_OPERATOR(*, struct std::__multiplies)
      |     ^~~~~~~~~~~~~~~~~~~~~~~~~~~~
/usr/include/c++/11/bits/valarray_after.h:407:5: note:   template argument deduction/substitution failed:
Bob.code:11:71: note:   mismatched types ‘const std::_Expr<_Dom1, typename _Dom1::value_type>’ and ‘int’
   11 |     for(int a=0,i=0;a<N;++a)if(adj[a].size()>=8)ic[a]=adj[i]+2*adj[i+1];
      |                                                                       ^
In file included from /usr/include/c++/11/valarray:603,
                 from /usr/include/x86_64-linux-gnu/c++/11/bits/stdc++.h...