Lines and Queries II
Your task is to efficiently process the following types of queries: - Add a line ax+b that is active in range [l,r] - Find the maximum point in any active line at position x Input The first line has an integer n: the number of queries. The following n lines describe the queries. The format of each line is either "1 a b l r" or "2 x". Output Print the answer for each query of type 2. If no l
HINT LADDERno hints yet
L1 Observation
L2 Technique
L3 Approach
L4 Pseudo-code
🔒
L5 Full solution
L5 unlocks only if you insist twice
solution.cppC++17
CodeSearch Tutor
Hints, not spoilers — it won’t hand over the full solution unless you insist.
Sign in to chat with the tutor and save your progress.
Sign in to start