| # | Time | Username | Problem | Language | Result | Execution time | Memory | 
|---|---|---|---|---|---|---|---|
| 165814 | ArKCa | Akcija (COCI15_akcija) | C++17 | 25 ms | 1016 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 mod 1000000007
#define pb push_back
#define pob pop_back
#define N 10
using namespace std;
vector<int>v;
int n;
ll tot;
int main(){
	// freopen("a.gir","r",stdin);
	// freopen("a.cik","w",stdout);
	scanf("%d",&n);
	int a;
	for(int i=0;i<n;i++){
		scanf("%d",&a);
		v.pb(a);
		tot+=a;
	}
	sort(v.begin(), v.end());
	ll ans=0;
	for(int i=(n-3);i>=0;i-=3){
		ans+=v[i];
	}
	printf("%lld\n",tot-ans );
}
Compilation message (stderr)
| # | Verdict | Execution time | Memory | Grader output | 
|---|---|---|---|---|
| Fetching results... | ||||
