# |
Submission time |
Handle |
Problem |
Language |
Result |
Execution time |
Memory |
382130 |
2021-03-26T12:59:37 Z |
BlancaHM |
Akcija (COCI15_akcija) |
C++14 |
|
38 ms |
1260 KB |
#include <iostream>
#include <algorithm>
using namespace std;
int main() {
int N;
cin >> N;
int prices[N], paid = 0;
for (int i = 0; i < N; i++) {
cin >> prices[i];
paid += prices[i];
}
sort(prices, prices+N);
for (int i = 0; i+2 < N; i += 3)
paid -= prices[i];
cout << paid;
return 0;
}
# |
Verdict |
Execution time |
Memory |
Grader output |
1 |
Incorrect |
1 ms |
364 KB |
Output isn't correct |
2 |
Incorrect |
1 ms |
364 KB |
Output isn't correct |
3 |
Incorrect |
1 ms |
364 KB |
Output isn't correct |
4 |
Correct |
1 ms |
364 KB |
Output is correct |
5 |
Correct |
1 ms |
384 KB |
Output is correct |
6 |
Correct |
29 ms |
1132 KB |
Output is correct |
7 |
Correct |
26 ms |
1132 KB |
Output is correct |
8 |
Correct |
25 ms |
1152 KB |
Output is correct |
9 |
Incorrect |
38 ms |
1260 KB |
Output isn't correct |
10 |
Incorrect |
38 ms |
1260 KB |
Output isn't correct |