← All problemsSign in

Chef and Photography

Chef is found of Photography. He usually does all the crazy stuff. Consider there are $N$ viewers of his photos and for each $i$ th person contributes $A$$i$ amount as gift for his great work. But theres a condition such that Chef cannot take money from $2$ people consecutively. Help chef to collect maximum amount of money. ### Input: - The first line of the input contains a single integer $T$ d

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