Get Subarray From Array To Hashmap In Cpp