QOJ.ac

QOJ

ID题目提交者结果用时内存语言文件大小提交时间测评时间
#615938#9448. Product Matrixucup-team3607#Compile Error//C++1454.9kb2024-10-05 20:59:362024-10-05 21:00:00

詳細信息

answer.code:1035:23: error: ‘mod’ was not declared in this scope; did you mean ‘modf’?
 1035 | constexpr int inv2 = (mod + 1) / 2;
      |                       ^~~
      |                       modf
answer.code: In function ‘void add(int&, int)’:
answer.code:1040:14: error: ‘mod’ was not declared in this scope; did you mean ‘modf’?
 1040 |     if (a >= mod)
      |              ^~~
      |              modf
answer.code: In function ‘int mult(int, int)’:
answer.code:1045:28: error: ‘mod’ was not declared in this scope; did you mean ‘modf’?
 1045 |     return int(ll(a) * b % mod);
      |                            ^~~
      |                            modf
answer.code: In function ‘void sub(int&, int)’:
answer.code:1051:14: error: ‘mod’ was not declared in this scope; did you mean ‘modf’?
 1051 |         a += mod;
      |              ^~~
      |              modf
In file included from /usr/include/c++/13/cassert:44,
                 from /usr/include/x86_64-linux-gnu/c++/13/bits/stdc++.h:106,
                 from answer.code:1025:
answer.code: In function ‘int inv(int)’:
answer.code:1067:25: error: ‘mod’ was not declared in this scope; did you mean ‘modf’?
 1067 |     assert(0 < a && a < mod);
      |                         ^~~
answer.code: In function ‘void fft(std::vector<base>&)’:
answer.code:1238:58: error: no match for ‘operator*’ (operand types are ‘__gnu_cxx::__alloc_traits<std::allocator<base>, base>::value_type’ {aka ‘base’} and ‘std::complex<long double>’)
 1238 |                 rep(i,k,2*k) rt[i] = R[i] = i&1 ? R[i/2] * x : R[i/2];
answer.code:1150:10: note: candidate: ‘base base::operator*(const base&) const’
 1150 |     base operator * (const base &o) const
      |          ^~~~~~~~
answer.code:1150:34: note:   no known conversion for argument 1 from ‘std::complex<long double>’ to ‘const base&’
 1150 |     base operator * (const base &o) const
      |                      ~~~~~~~~~~~~^
In file included from /usr/include/c++/13/ccomplex:39,
                 from /usr/include/x86_64-linux-gnu/c++/13/bits/stdc++.h:127,
                 from answer.code:2:
/usr/include/c++/13/complex:395:5: note: candidate: ‘template<class _Tp> std::complex<_Tp> std::operator*(const complex<_Tp>&, const complex<_Tp>&)’
  395 |     operator*(const complex<_Tp>& __x, const complex<_Tp>& __y)
      |     ^~~~~~~~
/usr/include/c++/13/complex:395:5: note:   template argument deduction/substitution failed:
answer.code:1238:60: note:   ‘__gnu_cxx::__alloc_traits<std::allocator<base>, base>::value_type’ {aka ‘base’} is not derived from ‘const std::complex<_Tp>’
 1238 |                 rep(i,k,2*k) rt[i] = R[i] = i&1 ? R[i/2] * x : R[i/2];
      |                                                            ^
/usr/include/c++/13/complex:404:5: note: candidate: ‘template<class _Tp> std::complex<_Tp> std::operator*(const complex<_Tp>&, const _Tp&)’
  404 |     operator*(const complex<_Tp>& __x, const _Tp& __y)
      |     ^~~~~~~~
/usr/include/c++/13/complex:404:5: note:   template argument deduction/substitution failed:
answer.code:1238:60: note:   ‘__gnu_cxx::__alloc_traits<std::allocator<base>, base>::value_type’ {aka ‘base’} is not derived from ‘const std::complex<_Tp>’
 1238 |                 rep(i,k,2*k) rt[i] = R[i] = i&1 ? R[i/2] * x : R[i/2];
      |                                                            ^
/usr/include/c++/13/complex:413:5: note: candidate: ‘template<class _Tp> std::complex<_Tp> std::operator*(const _Tp&, const complex<_Tp>&)’
  413 |     operator*(const _Tp& __x, const complex<_Tp>& __y)
      |     ^~~~~~~~
/usr/include/c++/13/complex:413:5: note:   template argument deduction/substitution failed:
answer.code:1238:60: note:   deduced conflicting types for parameter ‘_Tp’ (‘base’ and ‘long double’)
 1238 |                 rep(i,k,2*k) rt[i] = R[i] = i&1 ? R[i/2] * x : R[i/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: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 _Expr<_Dom1, typename _Dom1::value_type>&, const _Expr<_Dom2, typename _Dom2::value_type>&)’
  407 |     _DEFINE_EXPR_BINARY_OPERATOR(*, struct std::__multiplies)
      |     ^~~~~~~~~~~~~~~~~~~~~~~~~~~~
/usr/include/c++/13/bits/valarray_after.h:407:5: note:   template argument deduction/substitution failed:
answer.code:1238:60: note:   ‘__gnu_cxx::__alloc_traits<std::allocator<base>, base>::value_type’ {aka ‘base’} is not derived from ‘const std::_Expr<_Dom1, typename _Dom1::value_type>’
 1238 |                 rep(i,k,2*k) rt[i] = R[i] = i&1 ? R[i/2] * x : R[i/2];
      |                                                          ...