Hello people. I am trying this problem http://www.spoj.com/problems/SEGMENTS/ few hours and I can't come up with any good solution. Also I did not find any tutorial or any solution for that problem online and this is why I am posting it here. If anyone can suggest any idea or full solution it would be great.
Thank you !