Borderou de evaluare (job #1892697)
Utilizator | Data | 25 februarie 2017 11:02:34 | |
---|---|---|---|
Problema | Copaci | Status | done |
Runda | Arhiva de probleme | Compilator | cpp | Vezi sursa |
Scor | 0 |
Raport evaluator
Eroare de compilare:
user.cpp: In function ‘LL pct_lat(std::pair<long long int, long long int>, std::pair<long long int, long long int>)’:
user.cpp:39:39: error: call of overloaded ‘abs(long long int)’ is ambiguous
return cmmdc(abs(a.second-b.second), abs(a.first-b.first));
^
user.cpp:39:39: note: candidates are:
In file included from /usr/include/c++/4.8/cstdlib:72:0,
from /usr/include/c++/4.8/ext/string_conversions.h:41,
from /usr/include/c++/4.8/bits/basic_string.h:2815,
from /usr/include/c++/4.8/string:52,
from /usr/include/c++/4.8/bits/locale_classes.h:40,
from /usr/include/c++/4.8/bits/ios_base.h:41,
from /usr/include/c++/4.8/ios:42,
from /usr/include/c++/4.8/ostream:38,
from /usr/include/c++/4.8/iostream:39,
from user.cpp:1:
/usr/include/stdlib.h:771:12: note: int abs(int)
extern int abs (int __x) __THROW __attribute__ ((__const__)) __wur;
^
user.cpp:32:11: note: LL abs(LL)
inline LL abs(LL x)
^
In file included from user.cpp:3:0:
/usr/include/c++/4.8/cmath:99:5: note: constexpr typename __gnu_cxx::__enable_if<std::__is_integer<_Tp>::__value, double>::__type std::abs(_Tp) [with _Tp = long long int; typename __gnu_cxx::__enable_if<std::__is_integer<_Tp>::__value, double>::__type = double]
abs(_Tp __x)
^
/usr/include/c++/4.8/cmath:91:3: note: constexpr long double std::abs(long double)
abs(long double __x)
^
/usr/include/c++/4.8/cmath:87:3: note: constexpr float std::abs(float)
abs(float __x)
^
/usr/include/c++/4.8/cmath:81:3: note: constexpr double std::abs(double)
abs(double __x)
^
In file included from /usr/include/c++/4.8/ext/string_conversions.h:41:0,
from /usr/include/c++/4.8/bits/basic_string.h:2815,
from /usr/include/c++/4.8/string:52,
from /usr/include/c++/4.8/bits/locale_classes.h:40,
from /usr/include/c++/4.8/bits/ios_base.h:41,
from /usr/include/c++/4.8/ios:42,
from /usr/include/c++/4.8/ostream:38,
from /usr/include/c++/4.8/iostream:39,
from user.cpp:1:
/usr/include/c++/4.8/cstdlib:174:3: note: long long int std::abs(long long int)
abs(long long __x) { return __builtin_llabs (__x); }
^
/usr/include/c++/4.8/cstdlib:166:3: note: long int std::abs(long int)
abs(long __i) { return __builtin_labs(__i); }
^
user.cpp:39:61: error: call of overloaded ‘abs(long long int)’ is ambiguous
Ceva nu functioneaza?
- Citeste despre borderoul de evaluare.
- Daca tot nu e bine, contacteaza-ne pe forum !