Mayank and Golden Card
CodeChefOpen on judge ↗
Mayank has a challenge for Paawan. He has $N$ cards, numbered from $1$ to $N$, with each card having a number $A_i$ $(1 <= i <= n)$ written on it. He gives Paawan a Golden Card with a number $P$ on it. He asks Paawan to select some $K$ continuous cards from the deck of $N$ cards and sum the numbers that are present on the selected cards. Paawan's challenge is to minimise the number $K$, such th
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