Atleast and Atmost
There are $N$ hidden integer arrays of length $N$ each. You are given the mex of each of these $N$ arrays. Ashish likes lower bounds and Kryptonix likes upper bounds. So, for each $0 \leq i \leq N-1$, find: - The least possible number of occurrences of $i$ across all the arrays - The most possible number of occurrences of $i$ across all the arrays Note that these values must be computed independ
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