三、問答題 Problems (40%)
-
Given an array \( A \) with \( n \) integers \( A[0], A[1], ..., A[n-1] \), write a C program to find the maximum subsequence sum \( \sum_{k=i}^{j} A_k \), where \( 0 \le i \le j \le n-1 \).
For example: \( A[0] = -1, A[1] = 9, A[2] = -3, A[3] = 8, A[4] = -1 \) output the maximum subsequence sum \( (9)+(-3)+(8) = 14 \). (If you have many programs, choose the program with less running time.)