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_36569789_10647.cpp:12:46: error: 'bool stu::operator<(const stu&, const stu&)' must take exactly one argument
  bool operator <(const stu &a , const stu &b ) 
                                              ^
0_0_36569789_10647.cpp: In function 'void solve(int)':
0_0_36569789_10647.cpp:33:18: error: 'b' was not declared in this scope
    q[A-1].push({ b , k++ });
                  ^
0_0_36569789_10647.cpp:33:27: error: no matching function for call to 'std::priority_queue<stu>::push(<brace-enclosed initializer list>)'
    q[A-1].push({ b , k++ });
                           ^
0_0_36569789_10647.cpp:33:27: note: candidates are:
In file included from GCC4.9.2/x86_64-w64-mingw32/include/c++/queue:64:0,
                 from 0_0_36569789_10647.cpp:3:
GCC4.9.2/x86_64-w64-mingw32/include/c++/bits/stl_queue.h:499:7: note: void std::priority_queue<_Tp, _Sequence, _Compare>::push(const value_type&) [with _Tp = stu; _Sequence = std::vector<stu, std::allocator<stu> >; _Compare = std::less<stu>; std::priority_queue<_Tp, _Sequence, _Compare>::value_type = stu]
       push(const value_type& __x)
       ^
GCC4.9.2/x86_64-w64-mingw32/include/c++/bits/stl_queue.h:499:7: note:   no known conversion for argument 1 from '<brace-enclosed initializer list>' to 'const value_type& {aka const stu&}'
GCC4.9.2/x86_64-w64-mingw32/include/c++/bits/stl_queue.h:507:7: note: void std::priority_queue<_Tp, _Sequence, _Compare>::push(std::priority_queue<_Tp, _Sequence, _Compare>::value_type&&) [with _Tp = stu; _Sequence = std::vector<stu, std::allocator<stu> >; _Compare = std::less<stu>; std::priority_queue<_Tp, _Sequence, _Compare>::value_type = stu]
       push(value_type&& __x)
       ^
GCC4.9.2/x86_64-w64-mingw32/include/c++/bits/stl_queue.h:507:7: note:   no known conversion for argument 1 from '<brace-enclosed initializer list>' to 'std::priority_queue<stu>::value_type&& {aka stu&&}'
In file included from GCC4.9.2/x86_64-w64-mingw32/include/c++/string:48:0,
                 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_36569789_10647.cpp:1:
GCC4.9.2/x86_64-w64-mingw32/include/c++/bits/stl_function.h: In instantiation of 'bool std::less<_Tp>::operator()(const _Tp&, const _Tp&) const [with _Tp = stu]':
GCC4.9.2/x86_64-w64-mingw32/include/c++/bits/predefined_ops.h:121:46:   required from 'bool __gnu_cxx::__ops::_Iter_comp_iter<_Compare>::operator()(_Iterator1, _Iterator2) [with _Iterator1 = __gnu_cxx::__normal_iterator<stu*, std::vector<stu, std::allocator<stu> > >; _Iterator2 = __gnu_cxx::__normal_iterator<stu*, std::vector<stu, std::allocator<stu> > >; _Compare = std::less<stu>]'
GCC4.9.2/x86_64-w64-mingw32/include/c++/bits/stl_heap.h:216:37:   required from 'void std::__adjust_heap(_RandomAccessIterator, _Distance, _Distance, _Tp, _Compare) [with _RandomAccessIterator = __gnu_cxx::__normal_iterator<stu*, std::vector<stu, std::allocator<stu> > >; _Distance = long long int; _Tp = stu; _Compare = __gnu_cxx::__ops::_Iter_comp_iter<std::less<stu> >]'
GCC4.9.2/x86_64-w64-mingw32/include/c++/bits/stl_heap.h:334:15:   required from 'void std::__make_heap(_RandomAccessIterator, _RandomAccessIterator, _Compare) [with _RandomAccessIterator = __gnu_cxx::__normal_iterator<stu*, std::vector<stu, std::allocator<stu> > >; _Compare = __gnu_cxx::__ops::_Iter_comp_iter<std::less<stu> >]'
GCC4.9.2/x86_64-w64-mingw32/include/c++/bits/stl_heap.h:385:52:   required from 'void std::make_heap(_RandomAccessIterator, _RandomAccessIterator, _Compare) [with _RandomAccessIterator = __gnu_cxx::__normal_iterator<stu*, std::vector<stu, std::allocator<stu> > >; _Compare = std::less<stu>]'
GCC4.9.2/x86_64-w64-mingw32/include/c++/bits/stl_queue.h:414:48:   required from 'std::priority_queue<_Tp, _Sequence, _Compare>::priority_queue(const _Compare&, _Sequence&&) [with _Tp = stu; _Sequence = std::vector<stu, std::allocator<stu> >; _Compare = std::less<stu>]'
0_0_36569789_10647.cpp:23:25:   required from here
GCC4.9.2/x86_64-w64-mingw32/include/c++/bits/stl_function.h:371:20: error: no match for 'operator<' (operand types are 'const stu' and 'const stu')
       { return __x < __y; }
                    ^
GCC4.9.2/x86_64-w64-mingw32/include/c++/bits/stl_function.h:371:20: note: candidates are:
In file included from GCC4.9.2/x86_64-w64-mingw32/include/c++/bits/stl_algobase.h:64:0,
                 from GCC4.9.2/x86_64-w64-mingw32/include/c++/bits/char_traits.h:39,
                 from GCC4.9.2/x86_64-w64-mingw32/include/c++/ios:40,
                 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_36569789_10647.cpp:1:
GCC4.9.2/x86_64-w64-mingw32/include/c++/bits/stl_pair.h:220:5: note: template<class _T1, class _T2> constexpr bool std::operator<(const std::pair<_T1, _T2>&, const std::pair<_T1, _T2>&)
     operator<(const pair<_T1, _T2>& __x, const pair<_T1, _T2>& __y)
     ^
GCC4.9.2/x86_64-w64-mingw32/include/c++/bits/stl_pair.h:220:5: note:   template argument deduction/substitution failed:
In file included from GCC4.9.2/x86_64-w64-mingw32/include/c++/string:48:0,
                 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_36569789_10647.cpp:1:
GCC4.9.2/x86_64-w64-mingw32/include/c++/bits/stl_function.h:371:20: note:   'const stu' is not derived from 'const std::pair<_T1, _T2>'
       { return __x < __y; }
                    ^
In file included from GCC4.9.2/x86_64-w64-mingw32/include/c++/bits/stl_algobase.h:67:0,
                 from GCC4.9.2/x86_64-w64-mingw32/include/c++/bits/char_traits.h:39,
                 from GCC4.9.2/x86_64-w64-mingw32/include/c++/ios:40,
                 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_36569789_10647.cpp:1:
GCC4.9.2/x86_64-w64-mingw32/include/c++/bits/stl_iterator.h:298:5: note: template<class _Iterator> bool std::operator<(const std::reverse_iterator<_Iterator>&, const std::reverse_iterator<_Iterator>&)
     operator<(const reverse_iterator<_Iterator>& __x,
     ^
GCC4.9.2/x86_64-w64-mingw32/include/c++/bits/stl_iterator.h:298:5: note:   template argument deduction/substitution failed:
In file included from GCC4.9.2/x86_64-w64-mingw32/include/c++/string:48:0,
                 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_36569789_10647.cpp:1:
GCC4.9.2/x86_64-w64-mingw32/include/c++/bits/stl_function.h:371:20: note:   'const stu' is not derived from 'const std::reverse_iterator<_Iterator>'
       { return __x < __y; }
                    ^
In file included from GCC4.9.2/x86_64-w64-mingw32/include/c++/bits/stl_algobase.h:67:0,
                 from GCC4.9.2/x86_64-w64-mingw32/include/c++/bits/char_traits.h:39,
                 from GCC4.9.2/x86_64-w64-mingw32/include/c++/ios:40,
                 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_36569789_10647.cpp:1:
GCC4.9.2/x86_64-w64-mingw32/include/c++/bits/stl_iterator.h:348:5: note: template<class _IteratorL, class _IteratorR> bool std::operator<(const std::reverse_iterator<_Iterator>&, const std::reverse_iterator<_IteratorR>&)
     operator<(const reverse_iterator<_IteratorL>& __x,
     ^
GCC4.9.2/x86_64-w64-mingw32/include/c++/bits/stl_iterator.h:348:5: note:   template argument deduction/substitution failed:
In file included from GCC4.9.2/x86_64-w64-mingw32/include/c++/string:48:0,
                 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_36569789_10647.cpp:1:
GCC4.9.2/x86_64-w


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-02 12:35:42, Gzip enabled