While exploring a cave, Carl comes across a collection of $5$-pound rocks worth $14$ each, $4$-pound rocks worth $11$ each, and $1$-pound rocks worth $2$ each. There are at least $20$ of each size. He can carry at most $18$ pounds. What is the maximum value, in dollars, of the rocks he can carry out of the cave?
I was able to solve this quickly enough without too much of a hassle, but I don't get the official solution, which states
The answer is just $3\cdot 18=54$ minus the minimum number of rocks we need to make $18$ pounds, or $54-4=\boxed{\textbf{(C)} 50.}$ (AoPS)
How does this work? I think I'm almost getting there but I keep getting confused.
If a rock weighs $n$ pounds, it is worth $3n-1$ dollars.
So, if Carl gets $k$ rocks weighing $n_1, n_2, \ldots, n_k$ pounds, then the total value of rocks is $3(n_1+n_2+\cdots+n_k)-k$.
If Carl carries $18$ pounds of rocks out, i.e. $n_1+\cdots+n_k = 18$, then the total value is $3 \cdot 18 - k$, where $k$ is the number of rocks Carl carried out.
Note, I completely agree that is a poorly worded solution (assuming what you quoted was indeed their official solution).