I have a problem in my code A of last Div.2 contest.
for _ in range(int(input())): n=int (input()) l=list(map(int,input().split())) x=sum(l) if (x)==n: print(n-4) else: for i in range(n): if i!=n-1: if l[i]==-1 and l[i+1]==-1: x+=4 break else: if l[-1]==-1 and l==-1: x+=4 break print(x)
Those who don't Help.
By the way CP is Getting harder and harder by the minute.
I propose to have div 4 contests every week.
See this Blog.
What do you mean by that and you are not helping so you are this.
You had written one more condition. You were thinking l as the next index of l[-1].