Partition the sticks

Problem Name:
Partition the sticks
Site:Spoj
Links:
Tags:
Problem setters: