Pure C, no C++
Intuition\n Describe your first thoughts on how to solve this problem. \n\n# Approach\n Describe your approach to solving the problem. \n\n# Complexity\n- Time 
# Intuition\n<!-- Describe your first thoughts on how to solve this problem. -->\n\n# Approach\n<!-- Describe your approach to solving the problem. -->\n\n# Complexity\n- Time complexity:\n<!-- Add your time complexity here, e.g. $$O(n)$$ -->\n\n- Space complexity:\n<!-- Add your space complexity here, e.g. $$O(n)$$ -->\n\n# Code\n```\ntypedef struct{\n    uint64_t px;\n    uint32_t rx;\n    uint32_t ml;\n} dpe;\n\nint findMaximumLength(const int* xs, const int xl){\n    dpe* dp = malloc((xl+1)*sizeof(dpe));\n    uint32_t dpl = 1;\n    memset(&dp[0],0, sizeof(dpe));\n    uint64_t px = 0;\n    for(uint32_t i = 1, j = 0; i <= xl; ++i){\n        px += xs[i-1];\n        if(j >= dpl)\n            j = dpl - 1;\n        while(j+1<dpl){\n            if(!(px>=dp[j+1].rx+dp[j+1].px))\n                break;\n            ++j;\n        }\n        const uint32_t ml = dp[j].ml+1;\n        const uint32_t rx = px - dp[j].px;\n        while(1){\n            if(rx+px>=dp[dpl-1].rx+dp[dpl-1].px)\n                break;\n            --dpl;\n        }\n        dp[dpl].px = px;\n        dp[dpl].rx = rx;\n        dp[dpl].ml = ml;\n        ++dpl;\n    }\n    return dp[dpl-1].ml;\n}\n```
['C']