plz, tell me why was I getting -1.00 sec. if it was TLE with 1.01 sec then we know it is beyond the time limit but why -1.00 sec.
question link:CodeChef: Practical coding for everyone
my code:
#include <iostream>
using namespace std;
int main() {
// your code goes here
int t;
scanf("%d",&t);
int N,P,i,j,X;
int arr[60][60];
while(t--)
{
scanf("%d%d",&N,&P);
for(i=1;i<=N;i++)
{
int max=0;
for(j=1;j<=N;j++)
{
int al=1;
int r1=i,r2=i,c1=1,c2=j;
printf(" %d %d %d %d %d\n",al,r1,c1,r2,c2);
scanf("%d",&X);
if(X==-1)
_Exit(10);
else
{
if(X>max)
{
arr[i][j]=1;
max=X;
}
else
arr[i][j]=0;
}
}
}
printf("2\n");
for(i=1;i<=N;i++)
{
for(j=1;j<=N;j++)
{
printf("%d ",arr[i][j]);
}
printf("\n");
}
scanf("%d",&X);
if(X==-1)
_Exit(0);
}
return 0;
}