met.cpp: In function 'int main()':
met.cpp:58:28: error: no matching function for call to 'std::stack<int>::stack(int)'
58 | stack<int> to_check(k+2);
| ^
In file included from /usr/include/c++/10/stack:61,
from /usr/include/x86_64-linux-gnu/c++/10/bits/stdc++.h:89,
from met.cpp:1:
/usr/include/c++/10/bits/stl_stack.h:191:2: note: candidate: 'template<class _Alloc, class _Requires> std::stack<_Tp, _Sequence>::stack(std::stack<_Tp, _Sequence>&&, const _Alloc&) [with _Alloc = _Alloc; _Requires = _Requires; _Tp = int; _Sequence = std::deque<int, std::allocator<int> >]'
191 | stack(stack&& __q, const _Alloc& __a)
| ^~~~~
/usr/include/c++/10/bits/stl_stack.h:191:2: note: template argument deduction/substitution failed:
met.cpp:58:28: note: candidate expects 2 arguments, 1 provided
58 | stack<int> to_check(k+2);
| ^
In file included from /usr/include/c++/10/stack:61,
from /usr/include/x86_64-linux-gnu/c++/10/bits/stdc++.h:89,
from met.cpp:1:
/usr/include/c++/10/bits/stl_stack.h:187:2: note: candidate: 'template<class _Alloc, class _Requires> std::stack<_Tp, _Sequence>::stack(const std::stack<_Tp, _Sequence>&, const _Alloc&) [with _Alloc = _Alloc; _Requires = _Requires; _Tp = int; _Sequence = std::deque<int, std::allocator<int> >]'
187 | stack(const stack& __q, const _Alloc& __a)
| ^~~~~
/usr/include/c++/10/bits/stl_stack.h:187:2: note: template argument deduction/substitution failed:
met.cpp:58:28: note: candidate expects 2 arguments, 1 provided
58 | stack<int> to_check(k+2);
| ^
In file included from /usr/include/c++/10/stack:61,
from /usr/include/x86_64-linux-gnu/c++/10/bits/stdc++.h:89,
from met.cpp:1:
/usr/include/c++/10/bits/stl_stack.h:183:2: note: candidate: 'template<class _Alloc, class _Requires> std::stack<_Tp, _Sequence>::stack(_Sequence&&, const _Alloc&) [with _Alloc = _Alloc; _Requires = _Requires; _Tp = int; _Sequence = std::deque<int, std::allocator<int> >]'
183 | stack(_Sequence&& __c, const _Alloc& __a)
| ^~~~~
/usr/include/c++/10/bits/stl_stack.h:183:2: note: template argument deduction/substitution failed:
met.cpp:58:28: note: candidate expects 2 arguments, 1 provided
58 | stack<int> to_check(k+2);
| ^
In file included from /usr/include/c++/10/stack:61,
from /usr/include/x86_64-linux-gnu/c++/10/bits/stdc++.h:89,
from met.cpp:1:
/usr/include/c++/10/bits/stl_stack.h:179:2: note: candidate: 'template<class _Alloc, class _Requires> std::stack<_Tp, _Sequence>::stack(const _Sequence&, const _Alloc&) [with _Alloc = _Alloc; _Requires = _Requires; _Tp = int; _Sequence = std::deque<int, std::allocator<int> >]'
179 | stack(const _Sequence& __c, const _Alloc& __a)
| ^~~~~
/usr/include/c++/10/bits/stl_stack.h:179:2: note: template argument deduction/substitution failed:
met.cpp:58:28: note: candidate expects 2 arguments, 1 provided
58 | stack<int> to_check(k+2);
| ^
In file included from /usr/include/c++/10/stack:61,
from /usr/include/x86_64-linux-gnu/c++/10/bits/stdc++.h:89,
from met.cpp:1:
/usr/include/c++/10/bits/stl_stack.h:175:2: note: candidate: 'template<class _Alloc, class _Requires> std::stack<_Tp, _Sequence>::stack(const _Alloc&) [with _Alloc = _Alloc; _Requires = _Requires; _Tp = int; _Sequence = std::deque<int, std::allocator<int> >]'
175 | stack(const _Alloc& __a)
| ^~~~~
/usr/include/c++/10/bits/stl_stack.h:175:2: note: template argument deduction/substitution failed:
/usr/include/c++/10/bits/stl_stack.h: In substitution of 'template<class _Tp, class _Sequence> template<class _Alloc> using _Uses = typename std::enable_if<std::uses_allocator<_Sequence, _Alloc>::value>::type [with _Alloc = int; _Tp = int; _Sequence = std::deque<int, std::allocator<int> >]':
/usr/include/c++/10/bits/stl_stack.h:173:33: required from here
/usr/include/c++/10/bits/stl_stack.h:127:8: error: no type named 'type' in 'struct std::enable_if<false, void>'
127 | using _Uses = typename
| ^~~~~
/usr/include/c++/10/bits/stl_stack.h:170:7: note: candidate: 'std::stack<_Tp, _Sequence>::stack(_Sequence&&) [with _Tp = int; _Sequence = std::deque<int, std::allocator<int> >]'
170 | stack(_Sequence&& __c)
| ^~~~~
/usr/include/c++/10/bits/stl_stack.h:170:25: note: no known conversion for argument 1 from 'int' to 'std::deque<int, std::allocator<int> >&&'
170 | stack(_Sequence&& __c)
| ~~~~~~~~~~~~^~~
/usr/include/c++/10/bits/stl_stack.h:166:7: note: candidate: 'std::stack<_Tp, _Sequence>::stack(const _Sequence&) [with _Tp = int; _Sequence = std::deque<int, std::allocator<int> >]'
166 | stack(const _Sequence& __c)
| ^~~~~
/usr/include/c++/10/bits/stl_stack.h:166:30: note: no known conversion for argument 1 from 'int' to 'const std::deque<int, std::allocator<int> >&'
166 | stack(const _Sequence& __c)
| ~~~~~~~~~~~~~~~~~^~~
/usr/include/c++/10/bits/stl_stack.h:162:2: note: candidate: 'template<class _Seq, class _Requires> std::stack<_Tp, _Sequence>::stack() [with _Seq = _Seq; _Requires = _Requires; _Tp = int; _Sequence = std::deque<int, std::allocator<int> >]'
162 | stack()
| ^~~~~
/usr/include/c++/10/bits/stl_stack.h:162:2: note: template argument deduction/substitution failed:
met.cpp:58:28: note: candidate expects 0 arguments, 1 provided
58 | stack<int> to_check(k+2);
| ^
In file included from /usr/include/c++/10/stack:61,
from /usr/include/x86_64-linux-gnu/c++/10/bits/stdc++.h:89,
from met.cpp:1:
/usr/include/c++/10/bits/stl_stack.h:99:11: note: candidate: 'std::stack<int>::stack(const std::stack<int>&)'
99 | class stack
| ^~~~~
/usr/include/c++/10/bits/stl_stack.h:99:11: note: no known conversion for argument 1 from 'int' to 'const std::stack<int>&'
/usr/include/c++/10/bits/stl_stack.h:99:11: note: candidate: 'std::stack<int>::stack(std::stack<int>&&)'
/usr/include/c++/10/bits/stl_stack.h:99:11: note: no known conversion for argument 1 from 'int' to 'std::stack<int>&&'
met.cpp:66:38: error: no match for 'operator[]' (operand types are 'std::stack<int>' and '__gnu_cxx::__alloc_traits<std::allocator<int>, int>::value_type' {aka 'int'})
66 | if(L[i] != R[i]) to_check[(L[i]+R[i])/2].push(i);
| ^
met.cpp:82:28: error: no match for 'operator[]' (operand types are 'std::stack<int>' and 'int')
82 | while(!to_check[it].empty()) {
| ^
met.cpp:85:33: error: no match for 'operator[]' (operand types are 'std::stack<int>' and 'int')
85 | int u = to_check[it].top();
| ^
met.cpp:86:25: error: no match for 'operator[]' (operand types are 'std::stack<int>' and 'int')
86 | to_check[it].pop();
| ^