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 <stdio.h>
#include <algorithm>
using namespace std;
struct ab
{
int m;
}data[100000];
int aa(ab c,ab d)
{
if(c.m<d.m) return 1;
return 0;
}
int main()
{
int i,j,n,tot=0;
scanf("%d ",&n);
for(i=1;i<=n;i++)
{
scanf("%d ",&data[i].m);
}
std::sort(data+1,data+1+n,aa);
for(i=1;i<n;i++)
{
tot+=data[i].m;
}
printf("%d",tot);
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... |