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_39123904_11184.cpp: In function 'void solve()':
0_0_39123904_11184.cpp:20:15: error: no matching function for call to 'std::priority_queue<std::array<int, 3> >::push(<brace-enclosed initializer list>)'
   20 |         p.push({a[i]+a[i-1],i,i-1});
      |         ~~~~~~^~~~~~~~~~~~~~~~~~~~~
In file included from gcc-13.1.0/lib/gcc/x86_64-w64-mingw32/13.1.0/include/c++/queue:66,
                 from 0_0_39123904_11184.cpp:7:
gcc-13.1.0/lib/gcc/x86_64-w64-mingw32/13.1.0/include/c++/bits/stl_queue.h:738:7: note: candidate: 'void std::priority_queue<_Tp, _Sequence, _Compare>::push(const value_type&) [with _Tp = std::array<int, 3>; _Sequence = std::vector<std::array<int, 3>, std::allocator<std::array<int, 3> > >; _Compare = std::less<std::array<int, 3> >; value_type = std::array<int, 3>]'
  738 |       push(const value_type& __x)
      |       ^~~~
gcc-13.1.0/lib/gcc/x86_64-w64-mingw32/13.1.0/include/c++/bits/stl_queue.h:738:30: note:   no known conversion for argument 1 from '<brace-enclosed initializer list>' to 'const std::priority_queue<std::array<int, 3> >::value_type&' {aka 'const std::array<int, 3>&'}
  738 |       push(const value_type& __x)
      |            ~~~~~~~~~~~~~~~~~~^~~
gcc-13.1.0/lib/gcc/x86_64-w64-mingw32/13.1.0/include/c++/bits/stl_queue.h:746:7: note: candidate: 'void std::priority_queue<_Tp, _Sequence, _Compare>::push(value_type&&) [with _Tp = std::array<int, 3>; _Sequence = std::vector<std::array<int, 3>, std::allocator<std::array<int, 3> > >; _Compare = std::less<std::array<int, 3> >; value_type = std::array<int, 3>]'
  746 |       push(value_type&& __x)
      |       ^~~~
gcc-13.1.0/lib/gcc/x86_64-w64-mingw32/13.1.0/include/c++/bits/stl_queue.h:746:25: note:   no known conversion for argument 1 from '<brace-enclosed initializer list>' to 'std::priority_queue<std::array<int, 3> >::value_type&&' {aka 'std::array<int, 3>&&'}
  746 |       push(value_type&& __x)
      |            ~~~~~~~~~~~~~^~~
0_0_39123904_11184.cpp:23:17: error: aggregate 'std::array<int, 3> t' has incomplete type and cannot be defined
   23 |     array<int,3>t;
      |                 ^
0_0_39123904_11184.cpp:29:13: error: 'j' was not declared in this scope
   29 |         if (j>1) p.push({a[i]+a[j-1],i,j-1});
      |             ^
0_0_39123904_11184.cpp:29:24: error: no matching function for call to 'std::priority_queue<std::array<int, 3> >::push(<brace-enclosed initializer list>)'
   29 |         if (j>1) p.push({a[i]+a[j-1],i,j-1});
      |                  ~~~~~~^~~~~~~~~~~~~~~~~~~~~
gcc-13.1.0/lib/gcc/x86_64-w64-mingw32/13.1.0/include/c++/bits/stl_queue.h:738:7: note: candidate: 'void std::priority_queue<_Tp, _Sequence, _Compare>::push(const value_type&) [with _Tp = std::array<int, 3>; _Sequence = std::vector<std::array<int, 3>, std::allocator<std::array<int, 3> > >; _Compare = std::less<std::array<int, 3> >; value_type = std::array<int, 3>]'
  738 |       push(const value_type& __x)
      |       ^~~~
gcc-13.1.0/lib/gcc/x86_64-w64-mingw32/13.1.0/include/c++/bits/stl_queue.h:738:30: note:   no known conversion for argument 1 from '<brace-enclosed initializer list>' to 'const std::priority_queue<std::array<int, 3> >::value_type&' {aka 'const std::array<int, 3>&'}
  738 |       push(const value_type& __x)
      |            ~~~~~~~~~~~~~~~~~~^~~
gcc-13.1.0/lib/gcc/x86_64-w64-mingw32/13.1.0/include/c++/bits/stl_queue.h:746:7: note: candidate: 'void std::priority_queue<_Tp, _Sequence, _Compare>::push(value_type&&) [with _Tp = std::array<int, 3>; _Sequence = std::vector<std::array<int, 3>, std::allocator<std::array<int, 3> > >; _Compare = std::less<std::array<int, 3> >; value_type = std::array<int, 3>]'
  746 |       push(value_type&& __x)
      |       ^~~~
gcc-13.1.0/lib/gcc/x86_64-w64-mingw32/13.1.0/include/c++/bits/stl_queue.h:746:25: note:   no known conversion for argument 1 from '<brace-enclosed initializer list>' to 'std::priority_queue<std::array<int, 3> >::value_type&&' {aka 'std::array<int, 3>&&'}
  746 |       push(value_type&& __x)
      |            ~~~~~~~~~~~~~^~~
In file included from gcc-13.1.0/lib/gcc/x86_64-w64-mingw32/13.1.0/include/c++/vector:66,
                 from 0_0_39123904_11184.cpp:5:
gcc-13.1.0/lib/gcc/x86_64-w64-mingw32/13.1.0/include/c++/bits/stl_vector.h: In instantiation of 'constexpr std::_Vector_base<_Tp, _Alloc>::~_Vector_base() [with _Tp = std::array<int, 3>; _Alloc = std::allocator<std::array<int, 3> >]':
gcc-13.1.0/lib/gcc/x86_64-w64-mingw32/13.1.0/include/c++/bits/stl_vector.h:526:7:   required from 'std::priority_queue<_Tp, _Sequence, _Compare>::priority_queue() [with _Seq = std::vector<std::array<int, 3>, std::allocator<std::array<int, 3> > >; _Requires = void; _Tp = std::array<int, 3>; _Sequence = std::vector<std::array<int, 3>, std::allocator<std::array<int, 3> > >; _Compare = std::less<std::array<int, 3> >]'
0_0_39123904_11184.cpp:18:34:   required from here
gcc-13.1.0/lib/gcc/x86_64-w64-mingw32/13.1.0/include/c++/bits/stl_vector.h:367:49: error: invalid use of incomplete type 'struct std::array<int, 3>'
  367 |                       _M_impl._M_end_of_storage - _M_impl._M_start);
      |                       ~~~~~~~~~~~~~~~~~~~~~~~~~~^~~~~~~~~~~~~~~~~~
In file included from gcc-13.1.0/lib/gcc/x86_64-w64-mingw32/13.1.0/include/c++/bits/uses_allocator_args.h:38,
                 from gcc-13.1.0/lib/gcc/x86_64-w64-mingw32/13.1.0/include/c++/bits/memory_resource.h:41,
                 from gcc-13.1.0/lib/gcc/x86_64-w64-mingw32/13.1.0/include/c++/string:58,
                 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_39123904_11184.cpp:1:
gcc-13.1.0/lib/gcc/x86_64-w64-mingw32/13.1.0/include/c++/tuple:2005:45: note: declaration of 'struct std::array<int, 3>'
 2005 |   template<typename _Tp, size_t _Nm> struct array;
      |                                             ^~~~~
In file included from gcc-13.1.0/lib/gcc/x86_64-w64-mingw32/13.1.0/include/c++/string:48:
gcc-13.1.0/lib/gcc/x86_64-w64-mingw32/13.1.0/include/c++/bits/stl_iterator.h: In instantiation of 'constexpr typename __gnu_cxx::__normal_iterator<_Iterator, _Container>::difference_type __gnu_cxx::operator-(const __normal_iterator<_Iterator, _Container>&, const __normal_iterator<_Iterator, _Container>&) [with _Iterator = std::array<int, 3>*; _Container = std::vector<std::array<int, 3>, std::allocator<std::array<int, 3> > >; typename __normal_iterator<_Iterator, _Container>::difference_type = long long int]':
gcc-13.1.0/lib/gcc/x86_64-w64-mingw32/13.1.0/include/c++/bits/stl_heap.h:328:18:   required from 'constexpr void std::pop_heap(_RAIter, _RAIter, _Compare) [with _RAIter = __gnu_cxx::__normal_iterator<array<int, 3>*, vector<array<int, 3>, allocator<array<int, 3> > > >; _Compare = less<array<int, 3> >]'
gcc-13.1.0/lib/gcc/x86_64-w64-mingw32/13.1.0/include/c++/bits/stl_queue.h:776:15:   required from 'void std::priority_queue<_Tp, _Sequence, _Compare>::pop() [with _Tp = std::array<int, 3>; _Sequence = std::vector<std::array<int, 3>, std::allocator<std::array<int, 3> > >; _Compare = std::less<std::array<int, 3> >]'
0_0_39123904_11184.cpp:27:14:   required from here
gcc-13.1.0/lib/gcc/x86_64-w64-mingw32/13.1.0/include/c++/bits/stl_iterator.h:1337:27: error: invalid use of incomplete type 'struct std::array<int, 3>'
 1337 |     { return __lhs.base() - __rhs.base(); }
      |              ~~~~~~~~~~~~~^~~~~~~~~~~~~~
gcc-13.1.0/lib/gcc/x86_64-w64-mingw32/13.1.0/include/c++/tuple:2005:45: note: declaration of 'struct std::array<int, 3>'
 2005 |   template<typename _Tp, size_t _Nm> struct array;
      |                                             ^~~~~
gcc-13.1.0/lib/gcc/x86_64-w64-mingw32/13.1.0/include/c++/bits/stl_vector.h: In instantiation of 'constexpr void std::vector<_Tp, _Alloc>::pop_back() [with _Tp = std::array<int, 3>; _Alloc = std::allocator<std::array<int, 3> >]':
gcc-13.1.0/lib/gcc/x86_64-w64-mingw32/13.1.0/include/c++/bits/stl_queue.h:777:12:   required from 'void std::priority_queue<_Tp, _Sequence, _Compare>::pop() [with _Tp = std::array<int, 3>; _Sequence = std::vector<std::array<int, 3>, std::allocator<std::array<int, 3> > >; _Compare = std::less<std::array<int, 3> >]'
0_0_39123904_11184.cpp:27:14:   required from here
gcc-13.1.0/lib/gcc/x86_64-w64-mingw32/13.1.0/include/c++/bits/stl_vector.h:1320:25: error: cannot decrement a pointer to incomplete type 'std::array<int, 3>'
 1320 |         --this->_M_impl._M_finish;
      |           ~~~~~~~~~~~~~~^~~~~~~~~
In file included from gcc-13.1.0/lib/gcc/x86_64-w64-mingw32/13.1.0/include/c++/bits/move.h:57,
                 from gcc-13.1.0/lib/gcc/x86_64-w64-mingw32/13.1.0/include/c++/bits/exception_ptr.h:41,
                 from gcc-13.1.0/lib/gcc/x86_64-w64-mingw32/13.1.0/include/c++/exception:164,
                 from gcc-13.1.0/lib/gcc/x86_64-w64-mingw32/13.1.0/include/c++/ios:41:
gcc-13.1.0/lib/gcc/x86_64-w64-mingw32/13.1.0/include/c++/type_traits: In instantiation of 'struct std::is_destructible<std::array<int, 3> >':
gcc-13.1.0/lib/gcc/x86_64-w64-mingw32/13.1.0/include/c++/bits/stl_construct.h:188:51:   required from 'constexpr void std::_Destroy(_Forw


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-26 19:14:21, Gzip enabled