Maximum Subsequence Sum (25)-PAT甲级真题(最大连续子序列和、动态规划dp)
GivenasequenceofKintegers{N1,N2,…,NK}.Acontinuoussubsequenceisdefinedtobe{Ni,Ni+1,…,Nj}where1#includeusingnamespacestd;intmain(){intn;scanf("%d",&n);vectorv(n);intleftindex=0,rightindex=n-1,sum=-1,tem