Rakhi !
CodeChefOpen on judge ↗
Lokesh is celebrating Raksha Bandhan with his ‘N’ sisters. Each of his sisters plans to tie him one Rakhi, having some integer value. The integer value for all ‘N’ Rakhis is provided in an array ‘ARR’. Lokesh wants the total sum of values of all tied Rakhis to be strictly positive. Your task is to tell him the maximum Rakhis he can have on his hand. For example:- N = 3 ARR = [ 1, -1, 0 ] Lok
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