def maximizeFishing(A): for i in range(len(A)): for j in range(len(A[0,:])): A[i][j] += max(0 if i < 1 else A[i - 1][j], 0 if j < 1 else A[i][j - 1]) return A[-1][-1]
[EPI] maximize fishing [17.5]
原文:http://www.cnblogs.com/asrman/p/3955236.html