use dynamic programming can solve this easily. refer to this
let f[i][j] be the maximum points we can get using j dollars with the first i players, so
f[i][j] = max{
- f[i - 1][j] //we don't choose the i-th player
- f[i - 1][j - cost[i]] + point[i] //we choose him
}
finally f[TOTALPLAYER][MONEYCAP] is the answer.
the main idea is to determine whether to choose him or not for each player.
the array f[][] is just used to accelerate the search process.
btw, Chowlett is right.