Submission #237978

# Submission time Handle Problem Language Result Execution time Memory
237978 2020-06-09T14:42:41 Z bananamaths Akcija (COCI15_akcija) C++14
80 / 80
53 ms 1656 KB
#include<bits/stdc++.h>
using namespace std;

int main()
{
     int N;
     cin>>N;
     long long int V[N];
     long long int somma = 0;
     for(int i = 0;i<N;i++) {cin>>V[i];somma+=V[i];}
     sort(V, V+N);
     for(int i = N-3;i>=0;i-=3)
     {
        somma-=V[i];


     }
     cout<<somma;



     




}
# Verdict Execution time Memory Grader output
1 Correct 5 ms 256 KB Output is correct
2 Correct 5 ms 256 KB Output is correct
3 Correct 4 ms 256 KB Output is correct
4 Correct 5 ms 256 KB Output is correct
5 Correct 5 ms 384 KB Output is correct
6 Correct 42 ms 1400 KB Output is correct
7 Correct 36 ms 1404 KB Output is correct
8 Correct 36 ms 1528 KB Output is correct
9 Correct 53 ms 1656 KB Output is correct
10 Correct 51 ms 1656 KB Output is correct