0

I need to make a program that will extract numbers from a file sorted like bowling cones, like this:

1

2 5

2 2 7

1 6 4 8

2 9 4 7 3

and than calculate the maximum a bowler can score if the ball can go down on the next number diagonally. My question is what is the most efficient way i can solve this problem. The maximum number of lines is 100, and the time limit is 1 second, so brute force isn't the way to solve it. Any ideas?