Company: Flipkart_3sep
Difficulty: medium
Maximum Carrots Problem Description You are given a field laid out as an M x N grid, where each cell holds a number of carrots. A rabbit sets out from the top-left cell, taking steps either rightward or downward at each turn, and eventually reaches the bottom-right cell. Write a program that computes the largest total number of carrots the rabbit can gather while making this trip from the top-left cell to the bottom-right cell. The rabbit only ever steps down or right, never any other direction, and it eats every carrot sitting in each cell it passes through. Read the input from STDIN and print the output to STDOUT. Do not print arbitrary strings anywhere in the program, as these contribute to the output and test cases will fail. Input Format: The first line of input contains two integers M and N separated by a single white space, where M and N represent the size of the field. Next M lines have N integers, separated by a single white space, which represents the number of carrots in eac