Company: TCS codevita
Difficulty: medium
ScoreOfCells James is a school going kid, who just learned about rows, columns and tables. On one fine day he drew a table consisting of n rows and m columns. In each cell, he wrote a number randomly. James defined a concept 'score' for each cell. The score of a cell A is the number of unique ways possible from all the cells to reach A. For this, he has to follow a rule which states that, he can only move from current cell to either down/right cell only if the value those cells hold is not lesser than the value in the current cell. Given an integer k, find out the cells with score k. If there are more than one cell, then print the indices of the cells in the order they occur in the table from left to right and top to bottom. Print "NO" if there are no cells with such score. Note: Two ways are said to be unique if they have at least one different cell in its path. Constraints 1 ≤ n,m ≤ 100 0 ≤ table[i] ≤ 10^4 Input Format First line contains two integers n,m separated by space. Next n l