QOJ.ac

QOJ

IDProblemSubmitterResultTimeMemoryLanguageFile sizeSubmit timeJudge time
#297813#618. 多项式乘法ucup-team2335Compile Error//C++141.6kb2024-01-05 11:06:332024-01-05 11:06:35

Details

answer.code: In function ‘int main()’:
answer.code:47:45: error: call of overloaded ‘cos(db)’ is ambiguous
   47 |                 rep(i,0,S-1) Wn[bit][i]={cos(i*2*PI/S),sin(i*2*PI/S)};
      |                                          ~~~^~~~~~~~~~
In file included from /usr/include/features.h:461,
                 from /usr/include/x86_64-linux-gnu/c++/11/bits/os_defines.h:39,
                 from /usr/include/x86_64-linux-gnu/c++/11/bits/c++config.h:571,
                 from /usr/include/c++/11/cassert:43,
                 from /usr/include/x86_64-linux-gnu/c++/11/bits/stdc++.h:33,
                 from answer.code:1:
/usr/include/x86_64-linux-gnu/bits/mathcalls.h:62:1: note: candidate: ‘double cos(double)’
   62 | __MATHCALL_VEC (cos,, (_Mdouble_ __x));
      | ^~~~~~~~~~~~~~
In file included from /usr/include/x86_64-linux-gnu/c++/11/bits/stdc++.h:41,
                 from answer.code:1:
/usr/include/c++/11/cmath:188:3: note: candidate: ‘constexpr long double std::cos(long double)’
  188 |   cos(long double __x)
      |   ^~~
/usr/include/c++/11/cmath:184:3: note: candidate: ‘constexpr float std::cos(float)’
  184 |   cos(float __x)
      |   ^~~
answer.code:47:59: error: call of overloaded ‘sin(db)’ is ambiguous
   47 |                 rep(i,0,S-1) Wn[bit][i]={cos(i*2*PI/S),sin(i*2*PI/S)};
      |                                                        ~~~^~~~~~~~~~
In file included from /usr/include/features.h:461,
                 from /usr/include/x86_64-linux-gnu/c++/11/bits/os_defines.h:39,
                 from /usr/include/x86_64-linux-gnu/c++/11/bits/c++config.h:571,
                 from /usr/include/c++/11/cassert:43,
                 from /usr/include/x86_64-linux-gnu/c++/11/bits/stdc++.h:33,
                 from answer.code:1:
/usr/include/x86_64-linux-gnu/bits/mathcalls.h:64:1: note: candidate: ‘double sin(double)’
   64 | __MATHCALL_VEC (sin,, (_Mdouble_ __x));
      | ^~~~~~~~~~~~~~
In file included from /usr/include/x86_64-linux-gnu/c++/11/bits/stdc++.h:41,
                 from answer.code:1:
/usr/include/c++/11/cmath:429:3: note: candidate: ‘constexpr long double std::sin(long double)’
  429 |   sin(long double __x)
      |   ^~~
/usr/include/c++/11/cmath:425:3: note: candidate: ‘constexpr float std::sin(float)’
  425 |   sin(float __x)
      |   ^~~
answer.code:47:69: error: no match for ‘operator=’ (operand types are ‘__gnu_cxx::__alloc_traits<std::allocator<std::pair<__float128, __float128> >, std::pair<__float128, __float128> >::value_type’ {aka ‘std::pair<__float128, __float128>’} and ‘<brace-enclosed initializer list>’)
   47 |                 rep(i,0,S-1) Wn[bit][i]={cos(i*2*PI/S),sin(i*2*PI/S)};
      |                                                                     ^
In file included from /usr/include/c++/11/bits/stl_algobase.h:64,
                 from /usr/include/c++/11/bits/char_traits.h:39,
                 from /usr/include/c++/11/ios:40,
                 from /usr/include/c++/11/istream:38,
                 from /usr/include/c++/11/sstream:38,
                 from /usr/include/c++/11/complex:45,
                 from /usr/include/c++/11/ccomplex:39,
                 from /usr/include/x86_64-linux-gnu/c++/11/bits/stdc++.h:54,
                 from answer.code:1:
/usr/include/c++/11/bits/stl_pair.h:418:9: note: candidate: ‘template<class _U1, class _U2> typename std::enable_if<std::__and_<std::is_assignable<_T1&, const _U1&>, std::is_assignable<_T2&, const _U2&> >::value, std::pair<_T1, _T2>&>::type std::pair<_T1, _T2>::operator=(const std::pair<_U1, _U2>&) [with _U1 = _U1; _U2 = _U2; _T1 = __float128; _T2 = __float128]’
  418 |         operator=(const pair<_U1, _U2>& __p)
      |         ^~~~~~~~
/usr/include/c++/11/bits/stl_pair.h:418:9: note:   template argument deduction/substitution failed:
answer.code:47:69: note:   couldn’t deduce template parameter ‘_U1’
   47 |                 rep(i,0,S-1) Wn[bit][i]={cos(i*2*PI/S),sin(i*2*PI/S)};
      |                                                                     ^
In file included from /usr/include/c++/11/bits/stl_algobase.h:64,
                 from /usr/include/c++/11/bits/char_traits.h:39,
                 from /usr/include/c++/11/ios:40,
                 from /usr/include/c++/11/istream:38,
                 from /usr/include/c++/11/sstream:38,
                 from /usr/include/c++/11/complex:45,
                 from /usr/include/c++/11/ccomplex:39,
                 from /usr/include/x86_64-linux-gnu/c++/11/bits/stdc++.h:54,
                 from answer.code:1:
/usr/include/c++/11/bits/stl_pair.h:430:9: note: candidate: ‘template<class _U1, class _U2> typename std::enable_if<std::__and_<std::is_assignable<_T1&, _U1&&>, std::is_assignable<_T2&, _U2&&> >::value, std::pair<_T1, _T2>&>::type std::pair<_T1, _T2>::operator=(std::pair<_U1, _U2>&&) [with _U1 = _U1; _U2 = _U2; _T1 = __float128; _T2 = __float128]’
  430 |         operator=(pair<_U1, _U2>&& __p)
      |         ^~~~~~~~
/usr/include/c++/11/bits/stl_pai...