This is a problem that I found in my Google Code Jam. This time, it is a problem where we should put a lot of neuron work in the resolution of algorithm. Apparently, there is no obvious solution. The problem is:
You can check my solution at:
And my commit history at:
I was with few left time, so I only wrote some tests, and run the Google initial example. But I could not solve the “small set”. Some days ago, I tried again, but the result I got is not the correct, according Google.
So, some day I could take the problem again. It should be tricky how to decide the energy to put on each activity, knowing the future.
Let’s got, try to solve it!