Problem leftright
User R9q5P8
Submission Time 2026-11-05 10:49:46
Score 0
Max Time N/A
Max Memory N/A

Compile Error

leftright.cpp: In function ‘int main()’:
leftright.cpp:20:22: error: conversion from ‘std::deque<int>’ to non-scalar type ‘std::vector<int>’ requested
20 | vector<int> tmp = r;
| ^
leftright.cpp:22:8: error: no match for ‘operator=’ (operand types are ‘std::deque<int>’ and ‘std::vector<int>’)
22 | l = tmp;
| ^~~
In file included from /usr/include/c++/9/deque:69,
from /usr/include/x86_64-linux-gnu/c++/9/bits/stdc++.h:68,
from leftright.cpp:1:
/usr/include/c++/9/bits/deque.tcc:93:5: note: candidate: ‘std::deque<_Tp, _Alloc>& std::deque<_Tp, _Alloc>::operator=(const std::deque<_Tp, _Alloc>&) [with _Tp = int; _Alloc = std::allocator<int>]’
93 | deque<_Tp, _Alloc>::
| ^~~~~~~~~~~~~~~~~~
/usr/include/c++/9/bits/deque.tcc:94:28: note: no known conversion for argument 1 from ‘std::vector<in