← All problemsSign in

TRIP

$Chef$ wants to buy chocolates from Canteen for a $trip$. Chef has $S$ Rupees in his pocket. He wants to use $all$ of them. The canteen has $N$ chocolates of costs $C_1, C_2, ..., C_N$. A $non-empty$ subset $P$ of $\{1, 2, 3, ..., N\}$ is $good$ if, - $∑ C_k = S, k∈P$ - $P$ consists of $all$ $k$, k∈\{1, 2, ..., N\} such that $C_k\%5 == 0$. You need find the $number$ of $g

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