given x and y (the field dimensions) and x*y numbers, (pieces of cheese on each square) calculate the best way for the mouse to get from (1, 1) to (x, y), he has to get as many cheese as possible... also you can only move closer to the (x, y) (so he couldn't eat the whole field).

i tried going through a row while it's sum is higher than the column's and switching them that way but i kinda failed... is there an efficient algorithm to solve this problem? ...i'd just like a clue

gregorynoob
2
Junior Poster in Training

## Recommended Answers

Jump to PostIt's C++ programming forum. Where is C++ in your post?..

Jump to PostIt's C++ programming forum. Where is C++ in your post?..

There's no "Algorithm" or "Game Theory" section in Daniweb (as far as I know), so if gregorynoob is doing this in C++ and needs algorithm/strategy help, it seems like the right forum.

given x and y (the field dimensions) and …

## All 6 Replies

ArkM
1,090
Postaholic

VernonDozier
2,218
Posting Expert
Featured Poster

Salem
5,138
Posting Sage

ArkM
1,090
Postaholic

gregorynoob
2
Junior Poster in Training

gregorynoob
2
Junior Poster in Training

Be a part of the DaniWeb community

We're a friendly, industry-focused community of 1.20 million developers, IT pros, digital marketers, and technology enthusiasts learning and sharing knowledge.