# | Time | Username | Problem | Language | Result | Execution time | Memory |
---|---|---|---|---|---|---|---|
704696 | delrey | Akcija (COCI15_akcija) | C++14 | 36 ms | 1196 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 <iostream>
#include <bits/stdc++.h>
using namespace std;
int main()
{
int n, a[100000], v=0;
cin >> n;
for (int i=0; i<n; i++)
cin >> a[i];
sort(a, a+n);
for (int i=0; i<n; i++)
v+=a[i];
for (int i = n - 3; i>=0; i-=3)
{
v=v-a[i];
}
cout << v;
return 0;
}
# | Verdict | Execution time | Memory | Grader output |
---|---|---|---|---|
Fetching results... |