Computer Science, asked by mansidhiman892, 7 months ago

You will be given a square matrix of N
rows and N columns (1 <= N< 1000)
containing positive and negative
Integers with absolute value not larger
than 1000. You are required to
compute the greatest sum achievable
by walking a path, starting at any cell of
the matrix and always moving
downwards or rightwards. Additionally,
you have to report the number of Umes
that value is achievable N will be in the
first line of the input. N lines follow
with Nintegers each. You should
output a single line with two integers
separated by a single blank space: first
one is the greatest sum, second one is
the number of times this value can be
reached
Case 1:
For the input provided as follows:
5
3 1 -2 1 1
-6 -1 4 -1 -4
1 1 1 1 1
2 2 2 2 2
1 1 1 1 1 1

output of program
15 1​

Answers

Answered by ak2398829
0

Answer:

uuuuy88775432788899098765433 o k uytrr

Similar questions