QOJ.ac

QOJ

ID题目提交者结果用时内存语言文件大小提交时间测评时间
#803776#9868. GCDucup-team3932#Compile Error//C++20931b2024-12-07 18:29:212024-12-07 18:29:22

详细

answer.code: In function ‘void solve()’:
answer.code:27:20: error: no matching function for call to ‘__gcd(int&, i64)’
   27 |       int g = __gcd(a, B - r);
      |               ~~~~~^~~~~~~~~~
In file included from /usr/include/c++/13/algorithm:61,
                 from answer.code:6:
/usr/include/c++/13/bits/stl_algo.h:1185:5: note: candidate: ‘template<class _EuclideanRingElement> constexpr _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:27:20: note:   deduced conflicting types for parameter ‘_EuclideanRingElement’ (‘int’ and ‘long int’)
   27 |       int g = __gcd(a, B - r);
      |               ~~~~~^~~~~~~~~~