| 8 | |
| 9 | |
| 10 | int main() |
| 11 | |
| 12 | { |
| 13 | |
| 14 | |
| 15 | long long n; |
| 16 | cin>>n; |
| 17 | long long arr[n]; |
| 18 | for(int i=0;i<n;i++){ |
| 19 | cin>>arr[i]; |
| 20 | } |
| 21 | sort(arr,arr+n); |
| 22 | cout<<min(arr[n-2]-arr[0],arr[n-1]-arr[1]); |
| 23 | return 0; |
| 24 | } |
nothing calls this directly
no outgoing calls
no test coverage detected