Problem fibo
User blob
Submission Time 2023-12-20 14:08:12
Score 0
Max Time N/A
Max Memory N/A

Compile Error

fibo.cpp:3:26: error: use of parameter outside function body before ‘]’ token
3 | int fibo (int N, int dp[N]){
| ^
fibo.cpp: In function ‘int fibo(...)’:
fibo.cpp:4:6: error: ‘N’ was not declared in this scope
4 | if (N == 0) return 0;
| ^
fibo.cpp:5:9: error: ‘N’ was not declared in this scope
5 | if (N == 1) return 1;
| ^
fibo.cpp:6:6: error: ‘dp’ was not declared in this scope
6 | if (dp[N] != 1) return dp[N];
| ^~
fibo.cpp:6:9: error: ‘N’ was not declared in this scope
6 | if (dp[N] != 1) return dp[N];
| ^
fibo.cpp:7:9: error: ‘dp’ was not declared in this scope
7 | return dp[N] = fibo(N-1) + fibo(N-2);
| ^~
fibo.cpp:7:12: error: ‘N’ was not declared in this scope
7 | return dp[N] = fibo(N-1) + fibo(N-2);
| ^
fibo.cpp: In function ‘int main()’:
fibo.cpp:12:15: error: