|
|||
matrix-1We need to walk on the cells of an matrix, starting from any chosen starting cell. We can move to a horizontally or vertically adjacent cell, but only if the adjacent cell’s value is greater than the one we’re standing on. What is the maximum number of steps we can take ()? How many cells are there from which we can take the maximum possible number of steps ()? Input specificationis the number of test cases. Description of a test case: First line: and (number of rows and columns of the matrix). Then lines follow, each containing integers. Output specificationlines, each containing the requested numbers and . Constraints
Sample input 1
Sample output 1
|
|||
| University of Debrecen; Faculty of Informatics; v. 09/30/2024 |