[DP] Candy problem in O(n).
[Geometria] Max points on a line.