← All problemsSign in

Array Operations

CodeChefRating 2671Open on judge ↗

The [H-index](https://en.wikipedia.org/wiki/H-index) of an array is defined to be the maximum integer $H$ such that there are at least $H$ elements in the array which are greater than or equal to $H$. You're given an integer array $A$ and a positive integer $K$. You can do the following operation as many times as you want (possibly, none): - Pick two indices $i$ and $j$ such that $A_i$ is divis

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.

voice by Sarvam AI

Sign in to chat with the tutor and save your progress.

Sign in to start