BAPG

Russell loves solving math problems and also playing online games. Recently, he has started playing a game called BAPG. At the beginning of the game you are given limited bullets n and there are m enemies to kill. As Russell is a pro BAPG player, he spends only one bullet to kill an enemy. Killing each enemy gives bonus points which he can use to purchase in game elements. Bonus points for killing 1st,2nd….m’th enemies are a1, a2, …, am. If Russell kills enemies optimally can you tell the maximum point he can get after spending all n bullets.


This is a companion discussion topic for the original entry at https://toph.co/p/bapg