Problem | sumstack |
---|---|
User | TYW |
Submission Time | 2025-06-23 19:17:38 |
Score | 0 |
Max Time | N/A |
Max Memory | N/A |
Owl Get a Life
sumstack.cpp: In function ‘int32_t main()’:
sumstack.cpp:21:26: error: no matching function for call to ‘std::deque<int>::pop_back(int&)’
21 | DQ.pop_back(x);
| ^
In file included from /usr/include/c++/9/deque:67,
from /usr/include/x86_64-linux-gnu/c++/9/bits/stdc++.h:68,
from sumstack.cpp:1:
/usr/include/c++/9/bits/stl_deque.h:1628:7: note: candidate: ‘void std::deque<_Tp, _Alloc>::pop_back() [with _Tp = int; _Alloc = std::allocator<int>]’
1628 | pop_back() _GLIBCXX_NOEXCEPT
| ^~~~~~~~
/usr/include/c++/9/bits/stl_deque.h:1628:7: note: candidate expects 0 arguments, 1 provided
sumstack.cpp:27:19: error: invalid types ‘int[int]’ for array subscript
27 | psum[0]=0;
| ^
sumstack.cpp:29:23: error: invalid types ‘int[int]’ for array subscript
29 | psum[i]=psum[y-1]+arr[y-1