Plus Minus

Sort by

recency

|

679 Discussions

|

  • + 0 comments

    skbp71@gmail.com its my very important Gmail account Gmail haking please recovery my Gmail account

  • + 0 comments

    c=0 d=0 e=0 for i in arr: if i<0: c+=1 if i==0: d+=1 if i>0: e+=1 print(e/n) print(c/n) print(d/n)

  • + 0 comments

    so Kevin Mitnick is a hacker and and a criminal and he will use this i might do this

  • + 0 comments

    who are

  • + 0 comments

    include <iostream>

    include<vector>

    include <algorithm>// For std::sort

    void miniMaxSum(const std::vector<long>& arr) { // Sort the array std::vector<long> nums = arr; std::sort(nums.begin(), nums.end());

    // Calculate the minimum and maximum sums
    long minSum = 0, maxSum = 0;
    for (int i = 0; i < 4; i++) {
        minSum += nums[i];          // Sum of the smallest 4 elements
        maxSum += nums[i + 1];      // Sum of the largest 4 elements
    }
    
    std::cout << minSum << " " << maxSum << std::endl;
    

    }

    int main() { std::vector<long> arr(5); for (int i = 0; i < 5; ++i) { std::cin >> arr[i]; }

    miniMaxSum(arr);
    
    return 0;
    

    }