THE COMPANY
CodeChefOpen on judge ↗
After completion of graduation $John$ is in search of a Job. He found on his lucky day there are $N$ companies for which he can apply for job. Each company had a $market-value$ $Ai$ where $1 \leq i \leq N$. But there's a catch! He found that if he applies for a company with market-value $X$, all his applications for companies with market-values $X-1$ and $X+1$ will get rejected. John ask
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