Submission #758024

#TimeUsernameProblemLanguageResultExecution timeMemory
758024gelovFruits (NOI22_fruits)C++17
5 / 100
86 ms8828 KiB
#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 timeMemoryGrader output
Fetching results...
#Verdict Execution timeMemoryGrader output
Fetching results...
#Verdict Execution timeMemoryGrader output
Fetching results...
#Verdict Execution timeMemoryGrader output
Fetching results...
#Verdict Execution timeMemoryGrader output
Fetching results...
#Verdict Execution timeMemoryGrader output
Fetching results...