Problem fibo
User aj
Submission Time 2024-09-29 09:35:25
Score 0
Max Time N/A
Max Memory N/A

Compile Error

fibo.cpp:4:1: error: ‘int’ is not a template
4 | int <vector> memo;
| ^~~
fibo.cpp: In function ‘long long int fibo(int)’:
fibo.cpp:10:21: error: invalid types ‘int[int]’ for array subscript
10 | }else if (memo[N]!=-1){
| ^
fibo.cpp:11:22: error: invalid types ‘int[int]’ for array subscript
11 | return memo[N];
| ^
fibo.cpp:13:15: error: invalid types ‘int[int]’ for array subscript
13 | memo[N]=fibo(N-1)+fibo(N-2);
| ^
fibo.cpp: In function ‘int main()’:
fibo.cpp:20:10: error: request for member ‘assign’ in ‘memo’, which is of non-class type ‘int’
20 | memo.assign(N+1,-1);
| ^~~~~~