F.A.Q
Hand In Hand
Online Acmers
Problem Archive
Realtime Judge Status
Authors Ranklist
 
     C/C++/Java Exams     
ACM Steps
Go to Job
Contest LiveCast
ICPC@China
Best Coder beta
VIP | STD Contests
    DIY | Web-DIY beta
Author ID 
Password 
 Register new ID

View Compilation Error

0_0_14035128_25777.cpp: In function 'int main()':
0_0_14035128_25777.cpp:20:37: error: call of overloaded 'abs(long long int)' is ambiguous
         __int64 y1 = abs(x1 * x1 - m) / 2;
                                     ^
0_0_14035128_25777.cpp:20:37: note: candidates are:
In file included from GCC4.9.2/x86_64-w64-mingw32/include/c++/cmath:44:0,
                 from 0_0_14035128_25777.cpp:2:
GCC4.9.2/x86_64-w64-mingw32/include/math.h:205:15: note: int abs(int)
   int __cdecl abs(int _X);
               ^
0_0_14035128_25777.cpp:6:9: note: long long int abs(long long int)
 __int64 abs(__int64 x)
         ^
In file included from GCC4.9.2/x86_64-w64-mingw32/include/c++/ext/string_conversions.h:41:0,
                 from GCC4.9.2/x86_64-w64-mingw32/include/c++/bits/basic_string.h:2850,
                 from GCC4.9.2/x86_64-w64-mingw32/include/c++/string:52,
                 from GCC4.9.2/x86_64-w64-mingw32/include/c++/bits/locale_classes.h:40,
                 from GCC4.9.2/x86_64-w64-mingw32/include/c++/bits/ios_base.h:41,
                 from GCC4.9.2/x86_64-w64-mingw32/include/c++/ios:42,
                 from GCC4.9.2/x86_64-w64-mingw32/include/c++/ostream:38,
                 from GCC4.9.2/x86_64-w64-mingw32/include/c++/iostream:39,
                 from 0_0_14035128_25777.cpp:3:
GCC4.9.2/x86_64-w64-mingw32/include/c++/cstdlib:174:3: note: long long int std::abs(long long int)
   abs(long long __x) { return __builtin_llabs (__x); }
   ^
GCC4.9.2/x86_64-w64-mingw32/include/c++/cstdlib:166:3: note: long int std::abs(long int)
   abs(long __i) { return __builtin_labs(__i); }
   ^
In file included from 0_0_14035128_25777.cpp:2:0:
GCC4.9.2/x86_64-w64-mingw32/include/c++/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)
     ^
GCC4.9.2/x86_64-w64-mingw32/include/c++/cmath:91:3: note: constexpr long double std::abs(long double)
   abs(long double __x)
   ^
GCC4.9.2/x86_64-w64-mingw32/include/c++/cmath:87:3: note: constexpr float std::abs(float)
   abs(float __x)
   ^
GCC4.9.2/x86_64-w64-mingw32/include/c++/cmath:81:3: note: constexpr double std::abs(double)
   abs(double __x)
   ^
0_0_14035128_25777.cpp:21:37: error: call of overloaded 'abs(long long int)' is ambiguous
         __int64 y2 = abs(x2 * x2 - n) / 2;
                                     ^
0_0_14035128_25777.cpp:21:37: note: candidates are:
In file included from GCC4.9.2/x86_64-w64-mingw32/include/c++/cmath:44:0,
                 from 0_0_14035128_25777.cpp:2:
GCC4.9.2/x86_64-w64-mingw32/include/math.h:205:15: note: int abs(int)
   int __cdecl abs(int _X);
               ^
0_0_14035128_25777.cpp:6:9: note: long long int abs(long long int)
 __int64 abs(__int64 x)
         ^
In file included from GCC4.9.2/x86_64-w64-mingw32/include/c++/ext/string_conversions.h:41:0,
                 from GCC4.9.2/x86_64-w64-mingw32/include/c++/bits/basic_string.h:2850,
                 from GCC4.9.2/x86_64-w64-mingw32/include/c++/string:52,
                 from GCC4.9.2/x86_64-w64-mingw32/include/c++/bits/locale_classes.h:40,
                 from GCC4.9.2/x86_64-w64-mingw32/include/c++/bits/ios_base.h:41,
                 from GCC4.9.2/x86_64-w64-mingw32/include/c++/ios:42,
                 from GCC4.9.2/x86_64-w64-mingw32/include/c++/ostream:38,
                 from GCC4.9.2/x86_64-w64-mingw32/include/c++/iostream:39,
                 from 0_0_14035128_25777.cpp:3:
GCC4.9.2/x86_64-w64-mingw32/include/c++/cstdlib:174:3: note: long long int std::abs(long long int)
   abs(long long __x) { return __builtin_llabs (__x); }
   ^
GCC4.9.2/x86_64-w64-mingw32/include/c++/cstdlib:166:3: note: long int std::abs(long int)
   abs(long __i) { return __builtin_labs(__i); }
   ^
In file included from 0_0_14035128_25777.cpp:2:0:
GCC4.9.2/x86_64-w64-mingw32/include/c++/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)
     ^
GCC4.9.2/x86_64-w64-mingw32/include/c++/cmath:91:3: note: constexpr long double std::abs(long double)
   abs(long double __x)
   ^
GCC4.9.2/x86_64-w64-mingw32/include/c++/cmath:87:3: note: constexpr float std::abs(float)
   abs(float __x)
   ^
GCC4.9.2/x86_64-w64-mingw32/include/c++/cmath:81:3: note: constexpr double std::abs(double)
   abs(double __x)
   ^
0_0_14035128_25777.cpp:22:53: error: call of overloaded 'abs(long long int)' is ambiguous
         __int64 z1 = abs((x1 - 1) * (x1 - 1) + 1 - m) / 2 + 1;
                                                     ^
0_0_14035128_25777.cpp:22:53: note: candidates are:
In file included from GCC4.9.2/x86_64-w64-mingw32/include/c++/cmath:44:0,
                 from 0_0_14035128_25777.cpp:2:
GCC4.9.2/x86_64-w64-mingw32/include/math.h:205:15: note: int abs(int)
   int __cdecl abs(int _X);
               ^
0_0_14035128_25777.cpp:6:9: note: long long int abs(long long int)
 __int64 abs(__int64 x)
         ^
In file included from GCC4.9.2/x86_64-w64-mingw32/include/c++/ext/string_conversions.h:41:0,
                 from GCC4.9.2/x86_64-w64-mingw32/include/c++/bits/basic_string.h:2850,
                 from GCC4.9.2/x86_64-w64-mingw32/include/c++/string:52,
                 from GCC4.9.2/x86_64-w64-mingw32/include/c++/bits/locale_classes.h:40,
                 from GCC4.9.2/x86_64-w64-mingw32/include/c++/bits/ios_base.h:41,
                 from GCC4.9.2/x86_64-w64-mingw32/include/c++/ios:42,
                 from GCC4.9.2/x86_64-w64-mingw32/include/c++/ostream:38,
                 from GCC4.9.2/x86_64-w64-mingw32/include/c++/iostream:39,
                 from 0_0_14035128_25777.cpp:3:
GCC4.9.2/x86_64-w64-mingw32/include/c++/cstdlib:174:3: note: long long int std::abs(long long int)
   abs(long long __x) { return __builtin_llabs (__x); }
   ^
GCC4.9.2/x86_64-w64-mingw32/include/c++/cstdlib:166:3: note: long int std::abs(long int)
   abs(long __i) { return __builtin_labs(__i); }
   ^
In file included from 0_0_14035128_25777.cpp:2:0:
GCC4.9.2/x86_64-w64-mingw32/include/c++/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)
     ^
GCC4.9.2/x86_64-w64-mingw32/include/c++/cmath:91:3: note: constexpr long double std::abs(long double)
   abs(long double __x)
   ^
GCC4.9.2/x86_64-w64-mingw32/include/c++/cmath:87:3: note: constexpr float std::abs(float)
   abs(float __x)
   ^
GCC4.9.2/x86_64-w64-mingw32/include/c++/cmath:81:3: note: constexpr double std::abs(double)
   abs(double __x)
   ^
0_0_14035128_25777.cpp:23:53: error: call of overloaded 'abs(long long int)' is ambiguous
         __int64 z2 = abs((x2 - 1) * (x2 - 1) + 1 - n) / 2 + 1;
                                                     ^
0_0_14035128_25777.cpp:23:53: note: candidates are:
In file included from GCC4.9.2/x86_64-w64-mingw32/include/c++/cmath:44:0,
                 from 0_0_14035128_25777.cpp:2:
GCC4.9.2/x86_64-w64-mingw32/include/math.h:205:15: note: int abs(int)
   int __cdecl abs(int _X);
               ^
0_0_14035128_25777.cpp:6:9: note: long long int abs(long long int)
 __int64 abs(__int64 x)
         ^
In file included from GCC4.9.2/x86_64-w64-mingw32/include/c++/ext/string_conversions.h:41:0,
                 from GCC4.9.2/x86_64-w64-mingw32/include/c++/bits/basic_string.h:2850,
                 from GCC4.9.2/x86_64-w64-mingw32/include/c++/string:52,
                 from GCC4.9.2/x86_64-w64-mingw32/include/c++/bits/locale_classes.h:40,
                 from GCC4.9.2/x86_64-w64-mingw32/include/c++/bits/ios_base.h:41,
                 from GCC4.9.2/x86_64-w64-mingw32/include/c++/ios:42,
                 from GCC4.9.2/x86_64-w64-mingw32/include/c++/ostream:38,
                 from GCC4.9.2/x86_64-w64-mingw32/include/c++/iostream:39,
                 from 0_0_14035128_25777.cpp:3:
GCC4.9.2/x86_64-w64-mingw32/include/c++/cstdlib:174:3: note: long long int std::abs(long long int)
   abs(long long __x) { return __builtin_llabs (__x); }
   ^
GCC4.9.2/x86_64-w64-mingw32/include/c++/cstdlib:166:3: note: long int std::abs(long int)
   abs(long __i) { return __builtin_labs(__i); }
   ^
In file included from 0_0_14035128_25777.cpp:2:0:
GCC4.9.2/x86_64-w64-mingw32/include/c++/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)
 


Hangzhou Dianzi University Online Judge 3.0
Copyright © 2005-2024 HDU ACM Team. All Rights Reserved.
Designer & Developer : Wang Rongtao LinLe GaoJie GanLu
Total 0.000000(s) query 1, Server time : 2024-11-19 09:22:25, Gzip enabled