Submission #1084064

# Submission time Handle Problem Language Result Execution time Memory
1084064 2024-09-05T03:26:40 Z overwatch9 Akcija (COCI15_akcija) C++17
40 / 80
25 ms 1372 KB
#include <bits/stdc++.h>
using namespace std;
using ll = long long;
int main() {
    int n;
    cin >> n;
    vector <int> nums(n);
    for (int i = 0; i < n; i++)
        cin >> nums[i];
    sort(nums.begin(), nums.end());
    ll ans = 0;
    for (int i = 0; i < n; i++) {
        if (i % 3 == 0 && i+2 < n)
            continue;
        ans += nums[i];
    }
    cout << ans << '\n';
}
# Verdict Execution time Memory Grader output
1 Incorrect 0 ms 344 KB Output isn't correct
2 Incorrect 0 ms 348 KB Output isn't correct
3 Incorrect 0 ms 348 KB Output isn't correct
4 Correct 0 ms 348 KB Output is correct
5 Correct 1 ms 344 KB Output is correct
6 Correct 16 ms 1212 KB Output is correct
7 Correct 14 ms 1116 KB Output is correct
8 Correct 17 ms 1116 KB Output is correct
9 Incorrect 25 ms 1372 KB Output isn't correct
10 Incorrect 23 ms 1372 KB Output isn't correct