# | Time | Username | Problem | Language | Result | Execution time | Memory |
---|---|---|---|---|---|---|---|
153852 | SeekingOblivion | Akcija (COCI15_akcija) | C++14 | 62 ms | 1272 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<fstream>
#include<algorithm>
#include<iostream>
#define fin cin
#define fout cout
using namespace std;
//ifstream fin("karte.in");
//ofstream fout("karte.out");
int n,v[100001],i;
long long sol;
int main()
{
fin>>n;
for(i=1;i<=n;i++){fin>>v[i];sol+=v[i];}
sort(v+1,v+n+1);
for(i=n-2;i>=1;i-=3) sol-=v[i];
fout<<sol;
return 0;
}
# | Verdict | Execution time | Memory | Grader output |
---|---|---|---|---|
Fetching results... |