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_39365681_16511.cpp: In function 'double threeSearch(double, int, double)':
0_0_39365681_16511.cpp:26:37: error: no matching function for call to 'floor(double&, int&, double&)'
   26 |     double f2 = f(nextEarning, floor(mid, a, b);
      |                                ~~~~~^~~~~~~~~~~
In file included from 0_0_39365681_16511.cpp:3:
gcc-13.1.0/lib/gcc/x86_64-w64-mingw32/13.1.0/include/c++/cmath:274:5: note: candidate: 'template<class _Tp> constexpr typename __gnu_cxx::__enable_if<std::__is_integer<_Tp>::__value, double>::__type std::floor(_Tp)'
  274 |     floor(_Tp __x)
      |     ^~~~~
gcc-13.1.0/lib/gcc/x86_64-w64-mingw32/13.1.0/include/c++/cmath:274:5: note:   template argument deduction/substitution failed:
0_0_39365681_16511.cpp:26:37: note:   candidate expects 1 argument, 3 provided
   26 |     double f2 = f(nextEarning, floor(mid, a, b);
      |                                ~~~~~^~~~~~~~~~~
In file included from gcc-13.1.0/lib/gcc/x86_64-w64-mingw32/13.1.0/include/c++/cmath:47:
gcc-13.1.0/x86_64-w64-mingw32/include/math.h:194:18: note: candidate: 'double floor(double)'
  194 |   double __cdecl floor(double _X);
      |                  ^~~~~
gcc-13.1.0/x86_64-w64-mingw32/include/math.h:194:18: note:   candidate expects 1 argument, 3 provided
gcc-13.1.0/lib/gcc/x86_64-w64-mingw32/13.1.0/include/c++/cmath:266:3: note: candidate: 'constexpr long double std::floor(long double)'
  266 |   floor(long double __x)
      |   ^~~~~
gcc-13.1.0/lib/gcc/x86_64-w64-mingw32/13.1.0/include/c++/cmath:266:3: note:   candidate expects 1 argument, 3 provided
gcc-13.1.0/lib/gcc/x86_64-w64-mingw32/13.1.0/include/c++/cmath:262:3: note: candidate: 'constexpr float std::floor(float)'
  262 |   floor(float __x)
      |   ^~~~~
gcc-13.1.0/lib/gcc/x86_64-w64-mingw32/13.1.0/include/c++/cmath:262:3: note:   candidate expects 1 argument, 3 provided


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-23 04:17:51, Gzip enabled