A. Plus One on the Subset
tags: math; *800
solution:ans=max{a[i]|1<=i<=n}-min{a[i]|1<=i<=n}
code:
#include<bits/stdc++.h>
using namespace std;
const int maxn=50+5;
int t;
int n,a[maxn];
int main(){
ios::sync_with_stdio(0); cin.tie(0); cout.tie(0);
cin>>t;
while(t--){
cin>>n;
int _max=0,_min=INT_MAX;
for(int i=1;i<=n;i++){
cin>>a[i];
_max=max(_max