Because of the invariant established by add_line, we know that the best line for a given point is stored in one of the ancestors of its node. So we accumulate the maximum answer as we go back up the tree.
(&self, x: i64, l: i64, r: i64)
source not stored for this graph (policy: none)