# | Submission time | Handle | Problem | Language | Result | Execution time | Memory |
---|---|---|---|---|---|---|---|
406420 | 2021-05-17T14:56:25 Z | victoriad | Jelly Flavours (IOI20_jelly) | C++14 | 0 ms | 0 KB |
#include "jelly.h" #include <vector> using namespace std; int find_maximum_unique(int x, int y, std::vector<int> a, std::vector<int> b) { int n = a.size(); if(y==0){ sort(a.begin(),a.end()); int r=0; for(int i=0;i<n;i++){ if(a[i]<=x){ r++; x-=a[i]; } else{ break; } } return r; } return n; }