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_38933819_446.cpp: In function 'void gao()':
0_0_38933819_446.cpp:21:68: error: no match for 'operator-' (operand types are 'double' and 'PDD' {aka 'std::pair<double, double>'})
   21 |         ans=max(ans,fabs(a[i].second-a[i-1].second)/fabs(a[i].first-a[i-1]));
      |                                                          ~~~~~~~~~~^~~~~~~
      |                                                               |          |
      |                                                               double     PDD {aka std::pair<double, double>}
In file included from gcc-13.1.0/lib/gcc/x86_64-w64-mingw32/13.1.0/include/c++/string:48,
                 from gcc-13.1.0/lib/gcc/x86_64-w64-mingw32/13.1.0/include/c++/bits/locale_classes.h:40,
                 from gcc-13.1.0/lib/gcc/x86_64-w64-mingw32/13.1.0/include/c++/bits/ios_base.h:41,
                 from gcc-13.1.0/lib/gcc/x86_64-w64-mingw32/13.1.0/include/c++/ios:44,
                 from gcc-13.1.0/lib/gcc/x86_64-w64-mingw32/13.1.0/include/c++/ostream:40,
                 from gcc-13.1.0/lib/gcc/x86_64-w64-mingw32/13.1.0/include/c++/iostream:41,
                 from 0_0_38933819_446.cpp:1:
gcc-13.1.0/lib/gcc/x86_64-w64-mingw32/13.1.0/include/c++/bits/stl_iterator.h:625:5: note: candidate: 'template<class _IteratorL, class _IteratorR> constexpr decltype ((__y.base() - __x.base())) std::operator-(const reverse_iterator<_IteratorL>&, const reverse_iterator<_IteratorR>&)'
  625 |     operator-(const reverse_iterator<_IteratorL>& __x,
      |     ^~~~~~~~
gcc-13.1.0/lib/gcc/x86_64-w64-mingw32/13.1.0/include/c++/bits/stl_iterator.h:625:5: note:   template argument deduction/substitution failed:
0_0_38933819_446.cpp:21:74: note:   mismatched types 'const std::reverse_iterator<_IteratorL>' and 'double'
   21 |         ans=max(ans,fabs(a[i].second-a[i-1].second)/fabs(a[i].first-a[i-1]));
      |                                                                          ^
gcc-13.1.0/lib/gcc/x86_64-w64-mingw32/13.1.0/include/c++/bits/stl_iterator.h:1800:5: note: candidate: 'template<class _IteratorL, class _IteratorR> constexpr decltype ((__x.base() - __y.base())) std::operator-(const move_iterator<_IteratorL>&, const move_iterator<_IteratorR>&)'
 1800 |     operator-(const move_iterator<_IteratorL>& __x,
      |     ^~~~~~~~
gcc-13.1.0/lib/gcc/x86_64-w64-mingw32/13.1.0/include/c++/bits/stl_iterator.h:1800:5: note:   template argument deduction/substitution failed:
0_0_38933819_446.cpp:21:74: note:   mismatched types 'const std::move_iterator<_IteratorL>' and 'double'
   21 |         ans=max(ans,fabs(a[i].second-a[i-1].second)/fabs(a[i].first-a[i-1]));
      |                                                                          ^


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-09-28 18:19:34, Gzip enabled