Maximise:
$$D(x) = \sum_{i=1}^{9}d_ix_i$$
subject to:
$$d=(18,16,19,24,32,72,125,0,140)$$
$$c = (80,160,60,2000,2500,3500,3000,6000,25000)$$
$$h=(1,1,1,5,2,5,4,14,20)$$
$$\sum_{i=1}^9h_ix_i\leq K=200$$
$$x=(0,0,2,0,0,0,46,1,0)$$
I.e take 2 goblins, 46 wizards and 1 healer.
$$
\left(\begin{array}{rrrrrrrrrrrrrrrr}
0 & 0 & 0 & 0 & 0 & 0 & -4 & 0 & 0 & 0 & -4 & 0 & 0 & -7 & 0 & 0 \\
-5 & -3 & 0 & -4 & 0 & -5 & -2 & -4 & -8 & -7 & -7 & 0 & -5 & -9 & -3 & 0 \\
0 & 0 & 0 & 0 & 0 & 0 & 0 & 0 & 0 & 0 & 0 & 0 & 0 & 0 & 0 & 0 \\
-6 & -3 & -4 & -3 & -6 & -4 & -3 & -7 & -5 & -5 & -4 & 0 & -6 & -6 & -5 & 0 \\
-4 & -6 & -5 & -7 & -2 & -4 & -5 & -6 & -9 & -9 & -3 & 0 & -5 & -1 & -4 & -6 \\
-7 & 0 & 0 & -2 & 0 & 0 & -10 & 0 & -8 & 0 & -7 & 0 & -5 & -6 & -8 & 0 \\
-6 & 0 & 0 & -3 & 0 & -6 & -8 & -3 & -3 & -3 & -8 & 0 & -6 & -3 & -3 & 0 \\
-4 & -5 & -9 & -10 & 0 & -10 & -6 & 0 & -9 & -10 & -4 & 0 & -6 & -1 & -2 & 0 \\
-3 & 0 & 0 & -9 & 0 & -4 & -7 & 0 & -5 & 0 & -2 & 0 & -9 & -2 & -7 & 0 \\
0 & 0 & 0 & 0 & 0 & 0 & 0 & 0 & 0 & 0 & 0 & 0 & 0 & 0 & 0 & 0 \\
-7 & -5 & 0 & -1 & 0 & -8 & -2 & -1 & -10 & -10 & -8 & 0 & -9 & -9 & -6 & 0 \\
-5 & -2 & -9 & -2 & -8 & -9 & -3 & -4 & -3 & -6 & -2 & -5 & -7 & -2 & -7 & -3 \\
-6 & 0 & 0 & -10 & 0 & -7 & -9 & -2 & -5 & 0 & -7 & 0 & 0 & -5 & -3 & 0 \\
-3 & 0 & 0 & -6 & 0 & -5 & -4 & 0 & -8 & -8 & -3 & 0 & -5 & -7 & -5 & 0 \\
0 & 0 & 0 & 0 & 0 & 0 & 0 & 0 & 0 & 0 & 0 & 0 & 0 & 0 & 0 & 0 \\
-2 & -2 & -4 & -4 & -4 & -10 & -6 & -2 & -3 & -4 & -3 & -4 & -7 & -1 & -10 & -5
\end{array}\right)
$$
Why is 10 afraid of 7? Because 7 8 9.