9 line 0ms C++ solution
Code
# Code
```cpp []
class Solution {
public:
    int waysToSplit(vector<int>& nums) {
        partial_sum(begin(nums), end(nums), begin(nums));
        unsigned long result = 0;
        const uint n1 = nums.size() - 1, n2 = n1 - 1, bk = nums[n1];
        for (uint i = 0, j = 0, k = 0; i < n2; ++i) {
            for (j = max(j, i + 1); j < n1 && nums[j] < 2 * nums[i];) ++j;
            for (k = max(k, j); k < n1 && nums[k] * 2 <= bk + nums[i];) ++k;
            if (j == n1) break; else result += k - j;
        }
        return result % 1000000007;
    }
};
```
['C++']