Problem fibo
User maohaochen
Submission Time 2025-09-24 22:37:27
Score 0
Max Time N/A
Max Memory N/A

Compile Error

fibo.cpp: In function ‘int main()’:
fibo.cpp:12:27: error: class template argument deduction failed:
12 | int nextans = vector(i-1) + vector(i-2);
| ^
fibo.cpp:12:27: error: no matching function for call to ‘vector(int)’
In file included from /usr/include/c++/9/vector:67,
from fibo.cpp:2:
/usr/include/c++/9/bits/stl_vector.h:1872:5: note: candidate: ‘template<class _InputIterator, class _ValT, class _Allocator, class, class> std::vector(_InputIterator, _InputIterator, _Allocator)-> std::vector<_ValT, _Allocator>’
1872 | vector(_InputIterator, _InputIterator, _Allocator = _Allocator())
| ^~~~~~
/usr/include/c++/9/bits/stl_vector.h:1872:5: note: template argument deduction/substitution failed:
fibo.cpp:12:27: note: candidate expects 3 arguments, 1 provided
12 | int nextans = vector(i-1) + vector(i-2);
| ^
In file included f