My code works just fine but google is still showing a wrong answer. Please
help me out.
Here's my code:
no_of_inputs=int(input())
for i in range(no_of_inputs):
n = int(input())
A = []
A = list(map(int,input().strip().split()))[:n]
ct =[]
lt = []
for j in range(1,len(A)-1):
if((A[j]-A[j-1])==(A[j+1]-A[j])):
if(lt == []):
lt.append(A[j-1])
lt.append(A[j])
lt.append(A[j+1])
else:
lt.append(A[j+1])
else:
ct.append(len(lt))
lt = []
ct.append(len(lt))
print("Case #{}:".format(i+1),max(ct))
--
You received this message because you are subscribed to the Google Groups
"Google Code Jam" group.
To unsubscribe from this group and stop receiving emails from it, send an email
to [email protected].
To view this discussion on the web visit
https://groups.google.com/d/msgid/google-code/9599e362-b4ff-4751-beb8-99cedc114f92n%40googlegroups.com.