Problem rollercoaster
User lykieutrang
Submission Time 2025-06-20 14:14:11
Score 0
Max Time N/A
Max Memory N/A

Compile Error

rollercoaster.cpp: In function ‘int main()’:
rollercoaster.cpp:7:47: error: no matching function for call to ‘std::queue<long long int>::queue(ll&, int)’
7 | ll N, K; cin >> N >> K; queue<ll> vec(N, 0);
| ^
In file included from /usr/include/c++/9/queue:64,
from /usr/include/x86_64-linux-gnu/c++/9/bits/stdc++.h:86,
from rollercoaster.cpp:2:
/usr/include/c++/9/bits/stl_queue.h:189:2: note: candidate: ‘template<class _Alloc, class _Requires> std::queue<_Tp, _Sequence>::queue(std::queue<_Tp, _Sequence>&&, const _Alloc&)’
189 | queue(queue&& __q, const _Alloc& __a)
| ^~~~~
/usr/include/c++/9/bits/stl_queue.h:189:2: note: template argument deduction/substitution failed:
/usr/include/c++/9/bits/stl_queue.h: In substitution of ‘template<class _Tp, class _Sequence> template<class _Alloc> using _Uses = ty