Segment Not A Line

In a Li Chao tree over a coordinate range of size CC, what does inserting a full line cost against inserting a line restricted to [l,r][l, r]?

A

A full line is O(log⁡C)O(\log C), one root-to-leaf descent. A segment first decomposes [l,r][l, r] into O(log⁡C)O(\log C) canonical nodes and inserts into each, so it is O(log⁡2C)O(\log^2 C). Queries become Θ(log⁡2C)\Theta(\log^2 C) once segments are present.

B

A full line is O(log⁡C)O(\log C), one root-to-leaf descent. A segment first decomposes [l,r][l, r] into O(log⁡C)O(\log C) canonical nodes and inserts into each, so it is O(log⁡2C)O(\log^2 C). Queries stay O(log⁡C)O(\log C) either way.

C

A full line is O(log⁡C)O(\log C), one root-to-leaf descent. A segment prunes at the first node outside [l,r][l, r] and inserts only below it, so it is O(log⁡C)O(\log C) as well. Queries stay O(log⁡C)O(\log C) either way.

D

A full line is O(log⁡2C)O(\log^2 C), since the descent branches into both halves. A segment first decomposes [l,r][l, r] into O(log⁡C)O(\log C) canonical nodes and inserts into each, so it is O(log⁡C)O(\log C). Queries stay O(log⁡C)O(\log C) either way.