why tle show up?

#include<stdio.h>
#include<string.h>

int main()
{
	long long int t;
	char s[500001];
	long long int i=0,length=0,jump=0,day=0;
		
	scanf("%Ld",&t);
	while(t--)
	{
		scanf("%s",&s);
		while(s[i]!='\0')
		{
			if(s[i]=='.')
			length++;
			else
			{
				if(jump>=length)
				length=0;
				else
				{
					day++;
					jump=length;
					length=0;
				}
			}
			i++;
			
		}
		printf("%lld",day);
		printf("\n");
		memset(s,0,sizeof(s)*sizeof(char));
		i=0;length=0;jump=0;day=0;
	}
	return 0;

}

attic problem of june cookoff13

Can you tell me why you use

char s[500001];

when from problem statement we have:

1 ≤ |P| ≤ 1,000,000 (106)

?