# | Time | Username | Problem | Language | Result | Execution time | Memory |
---|---|---|---|---|---|---|---|
154128 | Linca_Robert | Akcija (COCI15_akcija) | C++14 | 59 ms | 1456 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<algorithm>
using namespace std;
int N, arr[1000005];
long long sum = 0;
int main(){
cin >> N;
for( int i = 1; i <= N; i++ )
cin >> arr[i];
sort( arr + 1, arr + N + 1 );
for( int i = N; i >= 1; i -= 3 ){
sum += arr[i] + arr[i - 1];
}
cout << sum << "\n";
}
# | Verdict | Execution time | Memory | Grader output |
---|---|---|---|---|
Fetching results... |