| # | Time | Username | Problem | Language | Result | Execution time | Memory | 
|---|---|---|---|---|---|---|---|
| 762580 | KN200711 | Akcija (COCI15_akcija) | C++14 | 15 ms | 1620 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;
int main() {
	int N;
	scanf("%d", &N);
	
	vector<ll> arr(N);
	for(int i=0;i<N;i++) scanf("%lld", &arr[i]);
	sort(arr.begin(), arr.end());
	
	int cnt = 0;
	ll ans = 0ll;
	for(int i=N-1;i>=0;i--) {
		cnt++;
		if(cnt%3 != 0) ans += arr[i];  
	}
	
	printf("%lld\n", ans);
	return 0;
}
Compilation message (stderr)
| # | Verdict | Execution time | Memory | Grader output | 
|---|---|---|---|---|
| Fetching results... | ||||
