Class Assingment problem

not able to know where is falt
wrong answer

#include<bits/stdc++.h>
using namespace std;
long long dp[101][5];
long long f(int n)
{

for(int i=0;i<2;i++)
    dp[i][0]=0;

for(int i=0;i<2;i++)
    {dp[i][1]=1;
    dp[i][0]=1;
    }
    for(int i=2;i<=n;i++)
    {

        dp[i][0]=dp[i-1][0]+dp[i-1][1];
        dp[i][1]=dp[i-1][0];
    }
    return (dp[n][0]+dp[n][1]);

}
int main()
{
int t;
cin>>t;
while(t–)
{
memset(dp,-1,sizeof(dp));
int n;
cin>>n;

	cout<<"#"<<n<<" : "<<f(n)<<endl;


}

}

Please send your code id.

Submission #3460255

#include<bits/stdc++.h>
using namespace std;
long long dp[101][5];
long long f(int n)
{

for(int i=0;i<2;i++)
    dp[i][0]=0;

for(int i=0;i<2;i++)
    {dp[i][1]=1;
    dp[i][0]=1;
    }
    for(int i=2;i<=n;i++)
    {

        dp[i][0]=dp[i-1][0]+dp[i-1][1];
        dp[i][1]=dp[i-1][0];
    }
    return (dp[n][0]+dp[n][1]);

}
int main()
{
int t;
cin>>t;
while(t–)
{
memset(dp,-1,sizeof(dp));
int n;
cin>>n;

	cout<<"#"<<n<<" : "<<f(n)<<endl;


}

}

/*
#include<bits/stdc++.h>
using namespace std;
void f(int n,int prev,int &cnt)
{
if(n==0){
cnt=cnt+1;
return ;
}
if(prev==1)
f(n-1,0,cnt);
else
{f(n-1,0,cnt);
f(n-1,1,cnt);
}
}
int main()
{
int t;
cin>>t;
while(t–)
{
int n;
cin>>n;
int cnt=0;
f(n-1,0,cnt);
f(n-1,1,cnt);
cout<<cnt<<endl;

}

}
*/

Paste your code on ide.codingblocks.com and then click press and send the generated link.
You can refer to this code for understanding.
https://github.com/robinrst/HackerBlocks/blob/master/classAssignment.cpp

I hope I’ve cleared your doubt. I ask you to please rate your experience here
Your feedback is very important. It helps us improve our platform and hence provide you
the learning experience you deserve.

On the off chance, you still have some questions or not find the answers satisfactory, you may reopen
the doubt.