๐—–๐—ฆ ๐—”๐—น๐—ด๐—ผ ๐Ÿ’ป ๐ŸŒ ใ€Ž๐—–๐—ผ๐—บ๐—ฝ๐—ฒ๐˜๐—ถ๐˜๐—ถ๐˜ƒ๐—ฒ ๐—ฃ๐—ฟ๐—ผ๐—ด๐—ฟ๐—ฎ๐—บ๐—บ๐—ถ๐—ป๐—ดใ€
9.63K subscribers
5.59K photos
3 videos
95 files
10.2K links
๐ŸšฉMain Group - @SuperExams
๐Ÿ“Job Updates - @FresherEarth

๐Ÿ”ฐAuthentic Coding Solutions(with Outputs)
โš ๏ธDaily Job Updates
โš ๏ธHackathon Updates & Solutions

Buy ads: https://telega.io/c/cs_algo
Download Telegram
#include<bits/stdc++.h>
using namespace std;
int main() {
    int N;
    cin >> N;

    vector<int> weights(N);
    for (int i = 0; i < N; ++i) {
        cin >> weights[i];
    }

    int total_weight = accumulate(weights.begin(), weights.end(), 0);
    int min_weight = *min_element(weights.begin(), weights.end());

    total_weight -= min_weight;

    for (int i = 0; i < N; ++i) {
        if (weights[i] != min_weight) {
            cout << weights[i] - min_weight << " ";
        }
    }

    return 0;
}
๐Ÿ‘1