Problem 2286 · Hard

Booking Concert Tickets in Groups

Two segment trees over rows, one for the longest free run and one for free seat counts, answer group and scatter bookings.

Open the interactive visualisation