Computer Science, asked by Rajfc, 11 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 valu 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 times that value is achievable. n will be in the fir line of the input. n lines follow with n integers 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 hacker rank

Answers

Answered by Anonymous
0

Answer:

(1 == n<= 1000) containing positive and negative integers with absolute valu 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 times that value is achievable. n will be in the fir line of the input. n lines follow with n integers 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 hacker rank

set of points over a straight line is defined as correlative to some k if the absoute difference between any two point is multiple of k given n (2<=n=100000) points and some integer k (1<=k=1000) your task to find the largest set exists. n and k will be in first line of the input n line will follow each one single integer representing the location of the one point which is correlated to k in the first line of input remaing line will contain the points of the set one per line in increasing order

Answered by Adarsh12332
0

Answer:

this is your answer that

Attachments:
Similar questions