Submission #336729

#TimeUsernameProblemLanguageResultExecution timeMemory
336729northlakeJelly Flavours (IOI20_jelly)C++17
10 / 100
3 ms640 KiB
#include<bits/stdc++.h> #include<jelly.h> using namespace std; int find_maximum_unique(int x, int y, vector<int> a, vector<int> b) { int answer = 0; int n = a.size(); // nb from b int b_price = b[0]; answer += y / b_price; // nb from a sort(a.begin(), a.end()); int sum = 0; int nb_a = 0; int counter = 0; while ((sum + a[counter]) <= x && counter < n) { sum += a[counter]; nb_a += 1; counter += 1; } answer += nb_a; // return result answer = min(answer, n); return answer; }
#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...