Submission #757954

#TimeUsernameProblemLanguageResultExecution timeMemory
757954Adrian_SoriagaFruits (NOI22_fruits)C++14
5 / 100
234 ms9020 KiB
#include <bits/stdc++.h> using namespace std; #define ll long long int main(){ int x,n; cin>>n; ll ans =0; vector<int>rows, price; for (int i =0;i<n;i++){ cin>>x; rows.push_back(x); } for (int i =0;i<n;i++){ cin>>x; price.push_back(x); } sort(price.begin(),price.end()); for (int i =n-1; i>=0;i--){ ans += price[i]; cout<<ans<<" "; } }
#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...