# | Time | Username | Problem | Language | Result | Execution time | Memory |
---|---|---|---|---|---|---|---|
166415 | outsider | Akcija (COCI15_akcija) | C++14 | 67 ms | 1656 KiB |
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 <bits/stdc++.h>
#define ll long long
using namespace std;
ll n,m,s;
vector<ll>a;
main (){
cin>>n;
a.resize(n+1);
ll ans=0;
for (int i=1;i<=n;i++)
{
cin>>a[i];
ans+=a[i];
}
sort(a.begin()+1,a.end());
for (int i=n-2;i>=1;i-=3)
{
ans-=a[i];
}
cout<<ans;
return 0;}
Compilation message (stderr)
# | Verdict | Execution time | Memory | Grader output |
---|---|---|---|---|
Fetching results... |