# | Time | Username | Problem | Language | Result | Execution time | Memory |
---|---|---|---|---|---|---|---|
400882 | Divanny | Jelly Flavours (IOI20_jelly) | C++14 | 0 ms | 0 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 jelly.h
#include <bits/stdc++.h>
using namespace std;
int find_maximum_unique(int x, int y, vector<int> a, vector<int> b)
{
int n = a.size();
sort(a.begin(), a.end());
int i = 0, cont = 0;
while (x - a[i] >= 0 && i < n)
{
if (x - a[i] >= 0)
{
cont++;
x -= a[i];
}
i++;
}
return cont;
}