Submission #336792

#TimeUsernameProblemLanguageResultExecution timeMemory
336792northlakeJelly Flavours (IOI20_jelly)C++17
0 / 100
1 ms384 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 n = a.size(); int counter = 0; int answer = 0; if (x > y) swap(x, y); sort(a.begin(), a.end()); int sum_x = 0; while ((sum_x + a[counter]) <= x && counter < n) { sum_x += a[counter]; answer += 1; counter += 1; } int sum_y = 0; while ((sum_y + a[counter]) <= y && counter < n) { sum_y += a[counter]; answer += 1; counter += 1; } 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...