POI 2014 - Hotels

Author: Andi Qu

The following two hints apply for all three approaches:

Hint 1

Hint 2

Approach 1 - Prefix/Suffix Sums

Hint 3

Solution

Approach 2 - DP

This section is not complete.

Any help would be appreciated! Just submit a Pull Request on Github.

Bonus - An O(NlogN)\mathcal{O}(N \log N) Solution

This section is not complete.

Any help would be appreciated! Just submit a Pull Request on Github.

See the Polish editorial for more details.

Join the USACO Forum!

Stuck on a problem, or don't understand a module? Join the USACO Forum and get help from other competitive programmers!