qianyan_ @ 2020-04-30 12:44:26
r=int(input())
mat=[[] for i in range(r)]
for i in range(r):
mat[i].extend(list(map(int,input().split())))
for i in range(r-2,0,-1):
for j in range(i+1):
mat[i][j]+=max(mat[i+1][j],mat[i+1][j+1])
mat[0][0]+=max(mat[1][0],mat[1][1])
print(mat[0][0])
by Cult_style @ 2020-04-30 12:45:23
c++的,帮不了你
by qianyan_ @ 2020-04-30 12:56:20
@暗忍、鼬 python的哭了
by Wildcxj @ 2020-06-21 08:54:15
我对python了解不多,是学c++的
by s唐家强 @ 2020-07-21 12:45:41
c++RE原因基本是数组设小了,看看对你python有没有帮助
by zty_luogu @ 2020-08-14 21:40:56
我c++也RE了