Editorial for COCI '07 Regional #1 Platforme


Remember to use this editorial only when stuck, and not to copy-paste code from it. Please be respectful to the problem author and editorialist.
Submitting an official solution before solving the problem yourself is a bannable offence.

For every platform P and each of its two ends, imagine extending a pillar downwards from that end. Of all platforms below platform P, the pillar will end on the highest platform whose horizontal coordinates contain the coordinate of the end. The result is the sum of lengths of all pillars.


Comments

There are no comments at the moment.