← All problemsSign in

Equal Subarrays

A class has $N$ number of students. The $i$th student has a result score $Mi$ stored in an array of length $n$. Find out all possible cuts $C1$, $C2$... $Cp$ (where $Cj$ = ($xj$, $yj$) ) within the array such that total scores outside the cut becomes equals to the total scores inside the cut that is ($M0+M1+… +M(x-1)$) + ($M(y+1)+M(y+2)+…+M(N-1)) = ($Mx+M(x+1)+...+My$), if there is no solution pri

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