| # | Time | Username | Problem | Language | Result | Execution time | Memory |
|---|---|---|---|---|---|---|---|
| 1327336 | jump | Jelly Flavours (IOI20_jelly) | C++20 | 22 ms | 496 KiB |
#include<bits/stdc++.h>
int dp[10010];
//least x spent with y spent
int find_maximum_unique(int x, int y, std::vector<int> a, std::vector<int> b) {
std::vector<std::pair<int,int>> comb;
for(int i=0;i<a.size();i++){
comb.push_back({a[i],b[i]});
}
std::sort(comb.begin(),comb.end());
int jelly=0;
for(auto [ca,cb]:comb){
for(int i=0;i<=10000;i++){
dp[i]=dp[i]+cb;
if(ca>=i)
dp[i]=std::min(dp[i],dp[i-ca]);
}
bool pos=false;
for(int i=0;i<=x;i++){
if(dp[i]<=y)pos=true;
}
if(!pos)break;
jelly+=1;
}
return jelly;
}
| # | Verdict | Execution time | Memory | Grader output |
|---|---|---|---|---|
| Fetching results... | ||||
| # | Verdict | Execution time | Memory | Grader output |
|---|---|---|---|---|
| Fetching results... | ||||
| # | Verdict | Execution time | Memory | Grader output |
|---|---|---|---|---|
| Fetching results... | ||||
| # | Verdict | Execution time | Memory | Grader output |
|---|---|---|---|---|
| Fetching results... | ||||
| # | Verdict | Execution time | Memory | Grader output |
|---|---|---|---|---|
| Fetching results... | ||||
| # | Verdict | Execution time | Memory | Grader output |
|---|---|---|---|---|
| Fetching results... | ||||
