# | Time | Username | Problem | Language | Result | Execution time | Memory |
---|---|---|---|---|---|---|---|
104662 | MatesV13 | Akcija (COCI15_akcija) | C++11 | 20 ms | 1280 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 n, c[100055];
long long sum, freebook;
int main (){
ios::sync_with_stdio(0);
cin.tie(0); cout.tie(0);
cin >> n;
for (int i=0;i<n;i++){
cin >> c[i];
sum += c[i];
}
sort (c, c+n);
for (int i=n-3;i>=0;i-=3){
freebook += c[i];
}
cout << sum - freebook;
return 0;
}
# | Verdict | Execution time | Memory | Grader output |
---|---|---|---|---|
Fetching results... |