Convex Hull Trick Optimization - Preparation to IOI Part 6