| # | Time | Username | Problem | Language | Result | Execution time | Memory | 
|---|---|---|---|---|---|---|---|
| 268489 | mayhoubsaleh | Akcija (COCI15_akcija) | C++14 | 18 ms | 1664 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
#define pb push_back
#define IOS ios_base::sync_with_stdio(false);cin.tie(0);cout.tie(0);
using namespace std;
const ll maxn=5e5+100;
const ll inf=1e9+10;
ll n;
ll a[maxn];
int main()
{
    IOS
    cin>>n;
    ll sum=0;
    for(ll i=0;i<n;i++)cin>>a[i],sum+=a[i];;
    sort(a,a+n);
    for(ll i=n-3;i>=0;i-=3){
        sum-=a[i];
    }
    cout<<sum<<endl;
    return 0;
}
| # | Verdict | Execution time | Memory | Grader output | 
|---|---|---|---|---|
| Fetching results... | ||||
