Problem pythonlist
User Xavier
Submission Time 2025-06-18 09:27:12
Score 0
Max Time N/A
Max Memory N/A

Compile Error

pythonlist.cpp: In function ‘int main()’:
pythonlist.cpp:18:26: error: no matching function for call to ‘std::deque<int>::pop_back(int&)’
18 | 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 pythonlist.cpp:3:
/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
pythonlist.cpp:19:22: error: expected ‘;’ before ‘{’ token
19 | } else (x==3){
| ^
| ;