Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

algorithms please use c language Problem #3. Programming Collecting seeds Given a matrix n m, people put several seeds on each cell of the matrix.

algorithms
please use c language
image text in transcribed
image text in transcribed
Problem #3. Programming Collecting seeds Given a matrix n m, people put several seeds on each cell of the matrix. A mouse is at the cell (i,j) can only move to one of the three cells (i, j+1), 1,j+ 1), (i+ 1,j+ 1). On the moving path, the mouse collects all seeds at cells that he passed Task Find the biggest number of seeds the mouse can collect when it moves from the first column (any row) to the last column of the matrix (any row). Input and out Input is read from the text file mouse.inp consisting of The first line contains two numbers which are the sizes n and m of the matrix Next n lines contain the number of seeds in each cell of the matrix Output is written to the text file seed.out consisting of ONLY ONE NUMBER which is the biggest number of seeds that the mouse can collect. Example: mouse.in mouse.out 5 7 90 62134 00 67133 43 Number of seeds 2532 1162 161 7 26213 This path has the biggest sum 43 Limitation - 1s n, m s 100 -O S The number of seeds of each cell s 100 Processing time of the proposed algorithm s 1 second Notice

Step by Step Solution

There are 3 Steps involved in it

Step: 1

blur-text-image

Get Instant Access to Expert-Tailored Solutions

See step-by-step solutions with expert insights and AI powered tools for academic success

Step: 2

blur-text-image

Step: 3

blur-text-image

Ace Your Homework with AI

Get the answers you need in no time with our AI-driven, step-by-step assistance

Get Started

Recommended Textbook for

Learning MySQL Get A Handle On Your Data

Authors: Seyed M M Tahaghoghi

1st Edition

0596529465, 9780596529468

More Books

Students also viewed these Databases questions