/ Vijos /

记录详情

Compile Error

/in/foo.cc: In function 'int main()':
/in/foo.cc:15:30: error: no matching function for call to '__gcd(long long int&, int&)'
   mul = mul / __gcd(mul, b[i]) * b[i];
                              ^
In file included from /usr/include/c++/6/algorithm:62:0,
                 from /usr/include/x86_64-linux-gnu/c++/6/bits/stdc++.h:65,
                 from /in/foo.cc:1:
/usr/include/c++/6/bits/stl_algo.h:1229:5: note: candidate: template<class _EuclideanRingElement> _EuclideanRingElement std::__gcd(_EuclideanRingElement, _EuclideanRingElement)
     __gcd(_EuclideanRingElement __m, _EuclideanRingElement __n)
     ^~~~~
/usr/include/c++/6/bits/stl_algo.h:1229:5: note:   template argument deduction/substitution failed:
/in/foo.cc:15:30: note:   deduced conflicting types for parameter '_EuclideanRingElement' ('long long int' and 'int')
   mul = mul / __gcd(mul, b[i]) * b[i];
                              ^

信息

递交者
类型
递交
题目
P1164 曹冲养猪
语言
C++
递交时间
2021-01-22 15:58:05
评测时间
2021-01-22 15:58:05
评测机
分数
0
总耗时
0ms
峰值内存
0 Bytes