https://codeforces.com/problemset/problem/1343/C
就是压缩,将一连串的负数保存一个最大的,将一连串的正数存一个最大的。
#includeusing namespace std; typedef long long int LL; const int N=1e5*2+10; LL a[N],t,n; int main(void) { cin>>t; while(t--) { cin>>n; for(int i=0;i >a[i]; vector A; LL temp=a[0]; for(int i=0;i



