"....you can split the array into m non-empty continuous subarrays"
I understood this to be.. that the subarrays themselves have to be continues (e.g. 1,2,3,4...)
The wording should be changed to prevent ambiguities.
How about just changing the example to something like
[7,2,5,10,8], 2 (which has answer
18 due to
@StefanPochmann Thanks, I have updated the problem description using your example to avoid misunderstanding.