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>&&}'
|