Friday, July 19, 2013

About SRM 585

Hello, competition is over and ratings started to change, I increased + 72 points, make me closer than ever to DIV 1. I'm quite excited.

LISNumberDivTwo:

The problem was pretty straightforward, it asked for the number of contiguous strictly increasing sub sequences. I unfortunately waste so many time coding a simple solution for this problem, thus, I managed to earn only 236.31 in a simple problem as this one.


TrafficCongestionDivTwo:

This problem required more analysis. The statement asks for the minimum number of 'cars' to be inserted in a complete binary tree, such that each car has a path (a paths can be empty) and no car paths intersect and each vertex must be visited by a car. As the problem statement illustration suggests, the optimal solution is to make from bottom to top, each card has a path of size 2, leaving a leaf note to a 1 step higher node and then to another leaf.

EnclosingTriangleColorful:

This problem is a tricky one, I managed to solve if in contest, but with a very unfeasible solution O(2^4 * (M - 2)^3 + (N log(N)). I'm trying to get a better solution that will be posted here.