Apple Tree Garden |2| ~~~~~~~~~~~~~~~~~~~~~ |image1| Imagine a garden of apple trees in the harvest time. Assuming the trees are planted in a regular way, in :math:`M` rows each of which has :math:`N` trees. Each tree has a different apple count. These count of apples can be represented as a matrix of :math:`M \times N`. There are :math:`M` workers each responsible of collecting the apples in a horizontal row. Write a script to find out the row which will procude the highest count of apple and print that row. - :math:`M` and :math:`N` are two positive integers. - Assume that the matrix, namely the ‘list of lists of integers’, representing the apple counts will be given to you in a variable :math:`\texttt{G}`. .. container:: sampleio Sample I/O: .. |2| image:: ../../figures/difficulty_two.png :class: difficulty .. |image1| image:: ../../figures/ch5_apple_tree_garden.png .. code:: default Input: G = [[30, 40, 20, 50], [60, 20, 40, 10], [50, 30, 70, 60], [30, 40, 40, 20]] Output: [50, 30, 70, 60] Input: G = [[20, 10, 20, 30, 80, 80, 50, 80, 40, 40], [20, 10, 50, 10, 20, 90, 90, 20, 60, 20], [50, 50, 90, 10, 60, 30, 60, 20, 40, 60], [20, 80, 60, 80, 90, 20, 20, 60, 80, 30], [10, 30, 50, 60, 20, 10, 90, 50, 80, 70]] Output: [20, 80, 60, 80, 90, 20, 20, 60, 80, 30] .. raw:: html .. raw:: html