Tiles problem -II


this is the link to my problem and my code is not working

if(i>m)
{
c[i]=(c[i-1]+c[i-m])%M;
}
else if(i<m)
{
c[i]=1;
}
else
{
c[i] = 2; and not c[i] == 2
/// c[i]==2;
}