Count Solutions
CodeChefOpen on judge ↗
Walter white sells drugs in packets whose weights are always power of $2$. There are $N$ customers and each of them have these packets. For each customer, you are given the weights of the packets (i.e. $p$ if weight is $2^p$). Let $W_{i}$ be the total weight of drugs $i^{th}$ customer has right now. Also, you are given another number $X$ and each customer will pay for the drugs if and only if Jess
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