Tilling problem

my this code seem to get AC but it only passesonly 1 test case what i a missing

#include <bits/stdc++.h>

using namespace std;

int countt(int n, int m)
{

int count[n + 1]; 
count[0] = 0; 


for (int i = 1; i <= n; i++) { 

	if (i > m) 
		count[i] = count[i - 1] + count[i - m]; 

	else if (i < m) 
		count[i] = 1; 

	else
		count[i] = 2; 
} 

return count[n]; 

}

int main()
{
long t;
cin>>t;
while(t–){
int n,m;
cin>>n>>m;
cout <<countt(n, m)<<endl;
}
}

This needs to be done.
dp[0]=1ll;
for(ll i=1;i<=n;i++){
// Placing the tile vertically
dp[i]=dp[i-1];
// Placint the tile horizontally if there is space
dp[i]+=((i-m)>=0)?dp[i-m]:0;
dp[i]%=mod;
}

You have used count[0]=0 which is wrong.

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.