Hello,

I have a problem which I would like to share. When I try to run my code for

the custom input, my code runs fine as shows the output exactly the same as

in the test case. However, when I run the code, it always shows me NZEC

error. Sometimes, my solutions have been accepted even when the code showed

NZEC error during the run. What exactly is the problem during the run?

I am attaching my code for the problem EID2 from LTIME75B. Please look into

it and tell me why isn’t my code getting accepted and about the general

NZEC error. Also, please tell me if there is any other email-id through

which I should write a mail like this. I had only this as the email-id from

Codechef and hence using this to convey. Please excuse me for that.

def interchange(matrix,i,j):

temp=matrix[i][0]

matrix[i][0]=matrix[j][0]

matrix[j][0]=temp

temp=matrix[i][1]

matrix[i][1]=matrix[j][1]

matrix[j][1]=temp

def check(matrix,i,j):

if (matrix[i][0]>=matrix[j][0]):

()

else:

interchange(matrix,i,j)

T=int(input())

for i in range(T):

(A1,A2,A3,C1,C2,C3)=list(map(int,input().split()))

matrix=[[A1,C1],[A2,C2],[A3,C3]]

check(matrix,0,1)

check(matrix,0,2)

check(matrix,1,2)

diff1=matrix[0][1]-matrix[1][1]

diff2=matrix[1][1]-matrix[2][1]

if ((diff1>=0)&(diff2>=0)):

print(‘FAIR’)

else:

print(‘NOT FAIR’)