• + 0 comments
    sort(arr.begin(), arr.end());
    int minsum = arr[0]+arr[1]+arr[2]+arr[3];
    int maxsum= arr[1]+arr[2]+arr[3]+arr[4];
    cout<<minsum<<maxsum<<endl;