#K91752. Choosing a Move in a Grid
Choosing a Move in a Grid
Choosing a Move in a Grid
You are given a grid of integers. Your task is to decide whether to remove a row or a column from the grid based on its dimensions. Let (R) denote the number of rows and (C) the number of columns. The decision rule is as follows:
[ \text{if } R \ge C, \text{ then remove the first row (index 0), i.e., choose } (\texttt{row}, 0)] ]
Otherwise, if (R < C), remove the first column (index 0), i.e., choose ((\texttt{col}, 0)).
Although the grid values are provided as input, they are not used for making the decision.
Please make sure to read the input from standard input (stdin) and output your answer to standard output (stdout).
inputFormat
The first line of input contains two space-separated integers (R) and (C) representing the number of rows and columns, respectively. This is followed by (R) lines, each containing (C) space-separated integers representing the grid values.
outputFormat
Output a single line with the move decision, which is either "row 0" (if (R \ge C)) or "col 0" (if (R < C)).## sample
3 3
1 2 3
4 5 6
7 8 9
row 0