QOJ.ac

QOJ

IDProblemSubmitterResultTimeMemoryLanguageFile sizeSubmit timeJudge time
#721557#9167. Coprime ArrayZhangYiDeCompile Error//C++11574b2024-11-07 16:23:182024-11-07 16:23:19

Details

answer.code: In function ‘int main()’:
answer.code:16:53: error: no matching function for call to ‘__gcd(int, long long int&)’
   16 |                 else if(__gcd(s - 4,x) == 1 && __gcd(3,x) == 1)cout << "1 3 " << s - 4;
      |                                                ~~~~~^~~~~
In file included from /usr/include/c++/13/algorithm:61,
                 from /usr/include/x86_64-linux-gnu/c++/13/bits/stdc++.h:51,
                 from answer.code:1:
/usr/include/c++/13/bits/stl_algo.h:1185:5: note: candidate: ‘template<class _EuclideanRingElement> _EuclideanRingElement std::__gcd(_EuclideanRingElement, _EuclideanRingElement)’
 1185 |     __gcd(_EuclideanRingElement __m, _EuclideanRingElement __n)
      |     ^~~~~
/usr/include/c++/13/bits/stl_algo.h:1185:5: note:   template argument deduction/substitution failed:
answer.code:16:53: note:   deduced conflicting types for parameter ‘_EuclideanRingElement’ (‘int’ and ‘long long int’)
   16 |                 else if(__gcd(s - 4,x) == 1 && __gcd(3,x) == 1)cout << "1 3 " << s - 4;
      |                                                ~~~~~^~~~~