Last active
October 9, 2017 02:21
-
-
Save nariaki3551/e04cd8a46d104ff5748a211eac7cc3e3 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
n=int(input()) | |
m=int(input()) | |
A=[list(map(int, input().split())) for _ in '1'*m] | |
B=[0]*m | |
for _ in range(n-1): | |
B = [max([B[k]+A[k][j] for k in range(m)]) for j in range(m)] | |
print(max(B)) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment