Students, heights and their IQs
CodeChefOpen on judge ↗
In the school morning assembly, $n$ students standing in a line. You, being the principal of the school know the heights and IQ levels of the students. This information is provided to you by an array $h$ and $iq$, where $h_i, iq_i$ denotes the height and the IQ of the $i$-th student, respectively. You want to find the longest subsequence of the students such that their heights are in strictly
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