Maximize
CodeChefOpen on judge ↗
Given an array with $N$ elements and you have to answer $Q$ queries of the form $L$ $R$ $A$ where $A$ is one of the two equal sides of an isosceles triangle. For each query you have to print $Arr[i]$ such that $ $L$ \leq i \leq $R$ $ which will give maximum area of isosceles triangle with sides $A$, $A$, $Arr[i]$. If there is no such side print "-1" without quotes. Note : Area of triangle
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