// 문제 설명
Given an array of n integers, find the contiguous subarray (containing at least one number) with the largest sum and output that sum.
// 입력
The first line contains an integer n (1 <= n <= 10^5). The second line contains n integers a_i (-10^4 <= a_i <= 10^4).
// 출력
A single integer: the maximum subarray sum.
// 힌트
Kadanes algorithm runs in O(n).