Codejam 2014 - Round 3 - Willow

16 Dec 2015

I cannot understand the solution for the large dataset.

However, for the small dataset, it's quite simple. We just brute-force the damn thing. There's a little twist in the brute-force; If it's Hanaa's turn, then we maximise the result, but if it's Sherine's turn, we minimise the result. And that's it.