# | TimeUTC-0 | Username | Problem | Language | Result | Execution time | Memory |
---|---|---|---|---|---|---|---|
757914 | Adrian_Soriaga | Gym Badges (NOI22_gymbadges) | C++14 | 422 ms | 9908 KiB |
This submission is migrated from previous version of oj.uz, which used different machine for grading. This submission may have different result if resubmitted.
#include <bits/stdc++.h>
using namespace std;
#define ll long long
int main(){
int n,x,ce=0,c=0; cin>>n;
vector<int> exp, levels;
for (int i =0; i<n; i++){
cin>>x;
exp.push_back(x);
}
for (int i =0; i<n; i++){
cin>>x;
levels.push_back(x);
}
sort(exp.begin(),exp.end());
while (ce<=levels[0]){
if (c==n){break;}
ce += exp[c];
c+=1;
}
cout<<c;
}
# | Verdict | Execution time | Memory | Grader output |
---|---|---|---|---|
Fetching results... |
# | Verdict | Execution time | Memory | Grader output |
---|---|---|---|---|
Fetching results... |
# | Verdict | Execution time | Memory | Grader output |
---|---|---|---|---|
Fetching results... |
# | Verdict | Execution time | Memory | Grader output |
---|---|---|---|---|
Fetching results... |