Subarray Division Hackerrank Solution In Cpp