Average Gift
Chef has a set $S$ containing $N$ **distinct** integers. Chef wants to gift Chefina an array $A$ of any finite length such that the following conditions hold true: - $A_i \in S$ $\forall i$. In other words, each element of the array $A$ should belong to the set $S$. - [Mean](https://en.wikipedia.org/wiki/Mean) value of all the elements in $A$ is **exactly** $X$. Find whether there exists an arr
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