Play with Roses
CodeChefOpen on judge ↗
Chef is in love. But he is not sure whether his partner is Happy or not. So like a typical Bollywood movie Chef goes to garden which contains many roses. Chef picks in his hand one or several roses and tears of petals one by one. After each petal he pronounces alternatively "Happy" and "Sad". Chef wants to pick up rose(s) with maximum possible total number of petals so that result would still be
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