P2938 [USACO09FEB] Stock Market G
Description
Despite their innate prudence, the cows took a beating in the home mortgage market and now are trying their hand at stocks. Happily, Bessie is prescient and knows not only today's S (2
Input Format
\* Line 1: Three space-separated integers: S, D, and M
\* Lines 2..S+1: Line s+1 contains the D prices for stock s on days 1..D: PR\_sd
Output Format
\* Line 1: The maximum amount of money possible to have after selling on day D.