Practice: Greedy methods
0 of 4 solved
About these problems
Apply, Connect, Reason and Stretch describe difficulty within this topic, not an official contest rating. Open any problem in any order; reading the chapter first is optional.
- 1Compatible sessionsChoose as many sessions as possible so that no chosen time intervals overlap. A session occupies [s, e); one ending at time t is compatible with one starting at t.ApplyNot started
- 2Two-seat boatsEach boat carries at most two people with total weight at most w. Find the minimum boats needed. Every person individually fits.ConnectNot started
- 3Covered timeFind the total length covered by the union of n half-open time intervals. Overlaps count only once.ReasonNot started
- 4Meeting coordinateChoose an integer x minimizing sum |a_i-x|. Print the minimum sum; you do not need to print x.StretchNot started