This submission is migrated from previous version of oj.uz, which used different machine for grading. This submission may have different result if resubmitted.
#include <iostream>
#include <fstream>
#include <cstdio>
#include <algorithm>
#include <vector>
using namespace std;
#define in cin
#define out cout
int main()
{
int n; in >> n;
vector<int> vec;
for(int i=0; i<n; i++)
{
int i1; in >> i1;
vec.push_back(i1);
} sort(vec.begin(), vec.end());
int res = 0;
for(int i=0; i<vec.size()-1; i++)
{
res += vec[i];
} out << res << endl;
return 0;
}
# | Verdict | Execution time | Memory | Grader output |
---|
Fetching results... |
# | Verdict | Execution time | Memory | Grader output |
---|
Fetching results... |
# | Verdict | Execution time | Memory | Grader output |
---|
Fetching results... |
# | Verdict | Execution time | Memory | Grader output |
---|
Fetching results... |
# | Verdict | Execution time | Memory | Grader output |
---|
Fetching results... |