Buggy python submission (verdict: Runtime Error):
n=int(input())
dp=[[a,b,c] for i in range(n)]
dp[0]=[0,0,0]
for i in range(1,n):
    a,b,c=map(int,input().split())
    dp[i][0]=max(dp[i-1][1],dp[i-1][2])+a
    dp[i][1]=max(dp[i-1][2],dp[i-1][0])+b
    dp[i][2]=max(dp[i-1][0],dp[i-1][1])+c
print(max(dp[n-1]))


Fixed submission:
n=int(input())
dp=[0,0,0]
for i in range(n):
    a,b,c=map(int,input().split())
    dp=[max(dp[1],dp[2])+a,max(dp[0],dp[2])+b,max(dp[0],dp[1])+c]
print(max(dp))

Buggy python submission (verdict: Runtime Error):
n=int(input())
dp=[[a,b,c] for i in range(n)]
for i in range(n):
    a,b,c=map(int,input().split())
    dp[i][0]=max(dp[i-1][1],dp[i-1][2])+a
    dp[i][1]=max(dp[i-1][2],dp[i-1][0])+b
    dp[i][2]=max(dp[i-1][0],dp[i-1][1])+c
print(max(dp[n-1]))

Fixed submission:
n=int(input())
dp=[0,0,0]
for i in range(n):
    a,b,c=map(int,input().split())
    dp=[max(dp[1],dp[2])+a,max(dp[0],dp[2])+b,max(dp[0],dp[1])+c]
print(max(dp))

Buggy python submission (verdict: Runtime Error):
n=int(input())
a=[]
b=[]
c=[]
for i in range(n):
    d,e,f=map(int,input().split())
    a.append(d)
    b.append(e)
    c.append(f)
dp[0]=[0,0,0]
for i in range(1,n):
    dp[i]=[dp[i-1][0]+max(b[i],c[i]),dp[i-1][1]+max(a[i],c[i]),dp[i-1][2]+max(b[i],a[i])]
print(max(dp[n-1]))


Fixed submission:
n=int(input())
dp=[0,0,0]
for i in range(n):
    a,b,c=map(int,input().split())
    dp=[max(dp[1],dp[2])+a,max(dp[0],dp[2])+b,max(dp[0],dp[1])+c]
print(max(dp))

Buggy python submission (verdict: Runtime Error):
n=int(input())
a=[]
b=[]
c=[]
for i in range(n):
    d,e,f=map(int,input().split())
    a.append(d)
    b.append(e)
    c.append(f)
dp[0]=[a[0],b[0],c[0]]
for i in range(1,n):
    dp[i]=[dp[i-1][0]+max(b[i],c[i]),dp[i-1][1]+max(a[i],c[i]),dp[i-1][2]+max(b[i],a[i])]
print(max(dp[n-1]))


Fixed submission:
n=int(input())
dp=[0,0,0]
for i in range(n):
    a,b,c=map(int,input().split())
    dp=[max(dp[1],dp[2])+a,max(dp[0],dp[2])+b,max(dp[0],dp[1])+c]
print(max(dp))

Buggy python submission (verdict: Runtime Error):
n=int(input())
a=[]
b=[]
c=[]
for i in range(n):
    d,e,f=map(int,input().split())
    a.append(d)
    b.append(e)
    c.append(f)
dp[0]=[a[0],b[0],c[0]]
for i in range(1,n):
    dp[i]=[dp[i-1][0]+max(b[i],c[i]),dp[i-1][1]+max(a[i],c[i]),dp[i-1][2]+max(b[i],a[i])]
print(dp[n-1])

Fixed submission:
n=int(input())
dp=[0,0,0]
for i in range(n):
    a,b,c=map(int,input().split())
    dp=[max(dp[1],dp[2])+a,max(dp[0],dp[2])+b,max(dp[0],dp[1])+c]
print(max(dp))

Buggy python submission (verdict: Runtime Error):
n=int(input())
dp=[0,0,0]
for i in range(n):
    a,b,c=map(int,input().split())
    dp[i]=[max(dp[1],dp[2])+a,max(dp[0],dp[2])+b,max(dp[0],dp[1])+c]
print(max(dp[n-1]))


Fixed submission:
n=int(input())
dp=[0,0,0]
for i in range(n):
    a,b,c=map(int,input().split())
    dp=[max(dp[1],dp[2])+a,max(dp[0],dp[2])+b,max(dp[0],dp[1])+c]
print(max(dp))

Buggy python submission (verdict: Runtime Error):
n=int(input())
dp=[0,0,0]
for i in range(n):
    a,b,c=map(int,input().split())
    dp=[max(dp[1],dp[2])+a,max(dp[0],dp[2])+b,max(dp[0],dp[1])+c]
print(max(dp[n-1]))

Fixed submission:
n=int(input())
dp=[0,0,0]
for i in range(n):
    a,b,c=map(int,input().split())
    dp=[max(dp[1],dp[2])+a,max(dp[0],dp[2])+b,max(dp[0],dp[1])+c]
print(max(dp))