Submission #758024

# Submission time Handle Problem Language Result Execution time Memory
758024 2023-06-14T04:58:25 Z gelov Fruits (NOI22_fruits) C++17
5 / 100
86 ms 8828 KB
#include<bits/stdc++.h>
using namespace std;

int main() {
    ios_base::sync_with_stdio(0);
    cin.tie(0);

    int n;
    cin >> n;

    vector<int> a(n), c(n);

    for (int i = 0; i < n; i++) cin >> a[i]; 
    for (int i = 0; i < n; i++) cin >> c[i]; 

    sort(c.begin(), c.end(), greater<int>());

    long long cur_ans = 0;
    for (int i = 0; i < n; i++) {
        cur_ans += c[i];
        cout << cur_ans << " ";
    }
    cout << "\n";
}

# Verdict Execution time Memory Grader output
1 Incorrect 0 ms 212 KB Output isn't correct
2 Halted 0 ms 0 KB -
# Verdict Execution time Memory Grader output
1 Correct 0 ms 212 KB Output is correct
2 Correct 1 ms 340 KB Output is correct
3 Correct 5 ms 596 KB Output is correct
4 Correct 43 ms 4584 KB Output is correct
5 Correct 86 ms 8828 KB Output is correct
6 Correct 0 ms 212 KB Output is correct
# Verdict Execution time Memory Grader output
1 Incorrect 0 ms 212 KB Output isn't correct
2 Halted 0 ms 0 KB -
# Verdict Execution time Memory Grader output
1 Incorrect 0 ms 212 KB Output isn't correct
2 Halted 0 ms 0 KB -
# Verdict Execution time Memory Grader output
1 Incorrect 70 ms 6136 KB Output isn't correct
2 Halted 0 ms 0 KB -
# Verdict Execution time Memory Grader output
1 Incorrect 0 ms 212 KB Output isn't correct
2 Halted 0 ms 0 KB -