Submission #757914

# Submission time Handle Problem Language Result Execution time Memory
757914 2023-06-14T01:18:39 Z Adrian_Soriaga Gym Badges (NOI22_gymbadges) C++14
9 / 100
422 ms 9908 KB
#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
1 Incorrect 1 ms 212 KB Output isn't correct
2 Halted 0 ms 0 KB -
# Verdict Execution time Memory Grader output
1 Correct 422 ms 6656 KB Output is correct
2 Correct 413 ms 6836 KB Output is correct
3 Correct 411 ms 7080 KB Output is correct
4 Correct 409 ms 7268 KB Output is correct
5 Correct 406 ms 5848 KB Output is correct
6 Correct 373 ms 7164 KB Output is correct
7 Correct 408 ms 9908 KB Output is correct
8 Correct 382 ms 5956 KB Output is correct
9 Correct 384 ms 5728 KB Output is correct
10 Correct 370 ms 5824 KB Output is correct
11 Correct 337 ms 5624 KB Output is correct
12 Correct 338 ms 6764 KB Output is correct
13 Correct 336 ms 5640 KB Output is correct
14 Correct 335 ms 6572 KB Output is correct
15 Correct 344 ms 7060 KB Output is correct
16 Correct 355 ms 6712 KB Output is correct
17 Correct 369 ms 5804 KB Output is correct
18 Correct 362 ms 6328 KB Output is correct
19 Correct 368 ms 6516 KB Output is correct
20 Correct 358 ms 6972 KB Output is correct
# Verdict Execution time Memory Grader output
1 Incorrect 1 ms 212 KB Output isn't correct
2 Halted 0 ms 0 KB -
# Verdict Execution time Memory Grader output
1 Incorrect 1 ms 212 KB Output isn't correct
2 Halted 0 ms 0 KB -