I solved this problem using technique which is mentioned in editorial. Then I came up with a different approach: we can iterate through the possible length of a subarray, pick one with the largest sum, update the answer. However, I don't know how to implement finding a subarray with length = 1..n and maximum sum fast enough to pass all tests.