MinMax Queries
CodeChefOpen on judge ↗
One day maths teacher gave the following task for the students, only upon completion students will be taken out for a school fun trip. First you are a given a list of n numbers and q queries. For each query you are given two indices x and y , you have to report the between the maximum number and minimum number whose indices lie within x and y (both inclusive) Input First line of input has two
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