Summation
CodeChefOpen on judge ↗
Rar the cat has a list of $N$ numbers in the range of $-10000$ to $10000$. He wants to know the maximum sum obtainable by either subtracting or adding the numbers. The sum starts with $0$ and you can either subtract or add a particular number in the list only once to the sum. ### Input - The first line will consist of a single integer, $N$. - The second line will consist of $N$ integers, in the r
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