# | Time | Username | Problem | Language | Result | Execution time | Memory |
---|---|---|---|---|---|---|---|
469040 | ala2 | Akcija (COCI15_akcija) | C++14 | 43 ms | 1172 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>
using namespace std;
int a[1001000];
int main()
{
int n;
cin>>n;
int g=0;
for(int i=1;i<=n;i++)
{
cin>>a[i];
g+=a[i];
}
sort(a+1,a+n+1);
reverse(a+1,a+1+n);
for(int i=1;i<=n;i++)
{
if(i%3)
continue;
g-=a[i];
}
cout<<g<<endl;
}
# | Verdict | Execution time | Memory | Grader output |
---|---|---|---|---|
Fetching results... |