#include<stdio.h> #include<string.h> long long max(long long a,long long b) { return a>b?a:b; } long long min(long long c,long long d) { return c<d?c:d; } int main() { int n; int sum=-9999999; while(scanf("%d",&a...