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_38352165_2038.cpp: In function 'void solve()':
0_0_38352165_2038.cpp:24:14: error: expected unqualified-id before '[' token
         auto [val,pos]=heap.top();heap.pop();
              ^
0_0_38352165_2038.cpp:25:13: error: 'val' was not declared in this scope
         rs+=val;++x[pos];
             ^
0_0_38352165_2038.cpp:25:21: error: 'pos' was not declared in this scope
         rs+=val;++x[pos];
                     ^
0_0_38352165_2038.cpp:26:34: error: no matching function for call to 'std::priority_queue<std::array<int, 2ull> >::push(<brace-enclosed initializer list>)'
         heap.push({func(pos),pos});
                                  ^
0_0_38352165_2038.cpp:26:34: note: candidates are:
In file included from GCC4.9.2/x86_64-w64-mingw32/include/c++/queue:64:0,
                 from GCC4.9.2/x86_64-w64-mingw32/include/c++/x86_64-w64-mingw32/bits/stdc++.h:85,
                 from 0_0_38352165_2038.cpp:1:
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 = std::array<int, 2ull>; _Sequence = std::vector<std::array<int, 2ull>, std::allocator<std::array<int, 2ull> > >; _Compare = std::less<std::array<int, 2ull> >; std::priority_queue<_Tp, _Sequence, _Compare>::value_type = std::array<int, 2ull>]
       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 std::array<int, 2ull>&}'
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 = std::array<int, 2ull>; _Sequence = std::vector<std::array<int, 2ull>, std::allocator<std::array<int, 2ull> > >; _Compare = std::less<std::array<int, 2ull> >; std::priority_queue<_Tp, _Sequence, _Compare>::value_type = std::array<int, 2ull>]
       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<std::array<int, 2ull> >::value_type&& {aka std::array<int, 2ull>&&}'


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-21 11:28:13, Gzip enabled