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_14802579_2368.cpp: In function 'int main()':
0_0_14802579_2368.cpp:37:69: error: call of overloaded 'abs(double)' is ambiguous
           f[k][i][j]=min(f[k][i][j],f[k-1][x][y]+abs(h[i][j]-h[x][y])*1.0/(K-k+1));
                                                                     ^
0_0_14802579_2368.cpp:37:69: note: candidates are:
0_0_14802579_2368.cpp:8:5: note: int abs(int)
 int abs(int 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_14802579_2368.cpp:1:
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); }
   ^


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-06-26 17:19:00, Gzip enabled