# | Time | Username | Problem | Language | Result | Execution time | Memory |
---|---|---|---|---|---|---|---|
469874 | Karabasan | Akcija (COCI15_akcija) | C++17 | 23 ms | 1612 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;
long long dizi[100005];
long long cevap;
int main()
{
int n;
scanf("%d",&n);
for(int i=1;i<=n;i++)
scanf("%lld",&dizi[i]);
sort(dizi+1,dizi+1+n);
reverse(dizi+1,dizi+1+n);
for(int i=1;i<=n;i++)
{
if(i%3==0)
dizi[i]=0;
}
for(int i=1;i<=n;i++)
cevap+=dizi[i];
printf("%lld",cevap);
return 0;
}
Compilation message (stderr)
# | Verdict | Execution time | Memory | Grader output |
---|---|---|---|---|
Fetching results... |