June-Cook-Off-CACHEHIT:Getting WA?

#include <stdio.h>
#include <stdlib.h>

int main()
{
int T, n, m, b, count, cblock, pblock;
scanf("%d", &T);
while (T- -)
{
scanf("%d %d %d", &n, &b, &m);
count = 0, cblock = -1;
for (int i = 0; i < m; i++)
{
scanf("%d", &pblock);
if (pblock >= 0 && pblock < n)
{
if (pblock >= b)
{
if (cblock >= b)
continue;
else
count++;
}
else if (pblock < b)
{
if (cblock < b && cblock >= 0)
continue;
else
count++;
}
cblock = pblock;
}
}
printf("%d\n", count);
}

return 0;

}

#include
#include
using namespace std;
int main()
{
int T,N,M,B;
cin>>T;
for(int i=0;i<T;i++)
{
cin>>N;
cin>>B;
cin>>M;
int block_number=-1;
int access[M],hit=0;
for(int i =0;i<M;i++)
cin>>access[i];
for(int i=0;i<M;i++)
{

		if(i==0)
		{
			block_number=ceil((access[i]+1)/B);
			hit++;
			
		}
		else if(ceil((access[i]+1)/B)!=block_number)
			{
				block_number=ceil((access[i]+1)/B);
				hit++;
			
			}
			else
			continue;
		
	}
cout<<hit<<endl;	
}
return 0;

}

I am also getting WA.

For input:
1
5 3 3
0 3 4
I get the correct output i.e. 2
Then after submitting, it shows WA error.
Could anybody help?