Solve and get sweets
CodeChefOpen on judge ↗
It was republic day, so there were sweets being distributed in your school. But since the number of sweets were less, the principal decided to keep a puzzle, so that whoever solves the puzzle gets the sweet. The puzzle goes as follows: Given an array $arr[]$ of $N$ integers, the task is to find the maximum sum of the array that can be obtained by doing the 1st complement of any subarray and a
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