There are \(n(1 \leq n \leq 1000000)\) books in the table, from left to right. Each book has a magic value \(a_i(-1000 \leq a_i \leq 1000, 1 \leq i \leq n)\),
Please find the max length of a continuous segment [l,r] , which satisfies \(\sum_{i=l}^r a_i > 0\).