#include <bits/stdc++.h> using namespace std; long long n ,a_max, a_min,i; int main () { cin >> n ; int* a= new int[n]; for (i = 0;i < n;i++) { cin >>a[i]; if (i ==0){ a_max = a[i]; a_min = a[i]; }else{ a_max = fmax(a[i],a_max); a_min = fmin(a[i],a_min); } } delete [] a; cout &l...