Problem 3667: Hotel. Solved on 05/10/2014.