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_39706702_1061.cpp: In function 'int main()':
0_0_39706702_1061.cpp:18:45: error: 'greater' was not declared in this scope
   18 |         partial_sort(arr, arr + m, arr + n, greater<int>());
      |                                             ^~~~~~~~~~~~
0_0_39706702_1061.cpp:18:45: note: suggested alternatives:
In file included from gcc-13.1.0/lib/gcc/x86_64-w64-mingw32/13.1.0/include/c++/bits/iterator_concepts.h:38,
                 from gcc-13.1.0/lib/gcc/x86_64-w64-mingw32/13.1.0/include/c++/bits/stl_iterator_base_types.h:71,
                 from gcc-13.1.0/lib/gcc/x86_64-w64-mingw32/13.1.0/include/c++/bits/stl_algobase.h:65,
                 from gcc-13.1.0/lib/gcc/x86_64-w64-mingw32/13.1.0/include/c++/algorithm:60,
                 from 0_0_39706702_1061.cpp:2:
gcc-13.1.0/lib/gcc/x86_64-w64-mingw32/13.1.0/include/c++/bits/ranges_cmp.h:143:10: note:   'std::ranges::greater'
  143 |   struct greater
      |          ^~~~~~~
In file included from gcc-13.1.0/lib/gcc/x86_64-w64-mingw32/13.1.0/include/c++/bits/stl_pair.h:65,
                 from gcc-13.1.0/lib/gcc/x86_64-w64-mingw32/13.1.0/include/c++/bits/stl_algobase.h:64:
gcc-13.1.0/lib/gcc/x86_64-w64-mingw32/13.1.0/include/c++/compare:51:57: note:   'std::__cmp_cat::_Ord::greater'
   51 |     enum class _Ord : type { equivalent = 0, less = -1, greater = 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-11-16 18:53:36, Gzip enabled