Olympic Scores
Problem LinkSolution by TheRealFertos — 100 pts
Code / Notes
#include <bits/stdc++.h>
using namespace std;
//professor pesquisa Eternal Sleep Paralysis
//https://www.youtube.com/watch?v=JtJuv17TjCM/esse aq
// Problema Atual: 2
int main () {
vector <int> a(5);
for (auto &x : a) {
cin >> x;
}
int b;
cin >> b;
sort (a.begin(), a.end());
a.pop_back();
sort (a.rbegin(), a.rend());
a.pop_back();
int y=0;
for (auto x : a) {
y+=x;
}
cout << y*b;
}
Last updated 16 hours, 12 minutes ago