# | Time | Username | Problem | Language | Result | Execution time | Memory |
---|---|---|---|---|---|---|---|
430696 | charterla | Jelly Flavours (IOI20_jelly) | C++14 | 132 ms | 2380 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 <iostream>
#include <algorithm>
#include <vector>
using namespace std;
int find_maximum_unique(int x, int y, vector<int> a, vector<int> b){
int f[505][505],ans=0;
for(int i=0;i<=x;i++){
for(int j=0;j<=y;j++){
f[i][j]=0;
}
}
for(int k=0;k<a.size();k++){
for(int i=x;i>=0;i--){
for(int j=y;j>=0;j--){
if(i>=a[k])f[i][j]=max(f[i][j],f[i-a[k]][j]+1);
if(j>=b[k])f[i][j]=max(f[i][j],f[i][j-b[k]]+1);
ans=max(ans,f[i][j]);
//cout<<f[i][j]<<" ";
}//cout<<endl;
}
}
return ans;
}
Compilation message (stderr)
# | 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... |