RUNTIME ERROR in ICPC problem

the following code runs perfectly well in dev cpp
but on uploading … it show runtime error
the code is in response to the jurasic park problem of the icpc round held on 11 nov
pl help

#include<stdio.h>

int main()
{
    int i,j,k,p,r,m,q,n,t,c;
    int res,x,y;
    scanf("%d",&t);
    int a[t][7];
    for(i=0;i<t;i++)
                    {
                    for(j=0;j<6;j++)
                                    {
                                      scanf("%d",&a[i][j]);
                                    }
                    }
    for(i=0;i<t;i++)
                    {
                    int avail;
                    n=m=q=p=r=k=x=avail=0;
                    n=a[i][0];
                    m=a[i][1];
                    q=a[i][2];
                    p=a[i][3];
                    r=a[i][4];
                    k=a[i][5];
                    int car[n];
                    if(r>0)
                    {
                    for(y=0;y<n;y++)
                                    {
                                    car[y]=0;
                                    }
                    for(j=1;j<=k;j++)
                                     {
                                     if(j%r==0)
                                                {
                                                 m--;
                                                 q++;
                                                }
                                     avail=0; 
                                     c=0;    
                                     for(y=0;y<n;y++)
                                                     {
                                                     if(car[y]==p)
                                                                  car[y]=0;
                                                     if(car[y]==0)
                                                                         avail++;
                                                     }  
                                     if(q>=avail)
                                            {
                                            q=q-avail;
                                            x=x+avail;  
                                            avail=0;
                                            for(y=0;y<n;y++)
                                                     {
                                                     if(car[y]!=0)
                                                                  car[y]++;
                                                     if(car[y]==0)
                                                                  car[y]++;
                                                     if(car[y]==p)
                                                                  car[y]=0;
                                                     }   
                                            }
                                     else if(q<avail)
                                            {
                                            for(y=0;y<n;y++)
                                                            {
                                                            if(car[y]!=0)
                                                                         car[y]++;
                                                            if(c<q && car[y]==0)
                                                                         {
                                                                         car[y]++;
                                                                         c++;
                                                                         }
                                                                        
                                                            }                                
                                            x=x+q;
                                            q=0;        
                                            }
                                    
                                    }
                     res=0;
                    for(y=0;y<n;y++)
                                    {
                                    if(car[y]==0)
                                                res++;
                                    if(car[y]!=0)
                                                 x--;
                                    }
                    printf("\n%d %d %d %d",res,x,m,q);                                                       
                    }
    }
}

I think the size of the array can not be decided at the run time (You have used a[t][7] which is wrong).

No, this is not a problem…