Submission #430691

#TimeUsernameProblemLanguageResultExecution timeMemory
430691charterlaJelly Flavours (IOI20_jelly)C++14
0 / 100
4 ms2452 KiB
#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 k=0;k<a.size();k++){ for(int i=x;i>=0;i--){ for(int j=y;j>=0;j--){ f[i][j]=0; 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)

jelly.cpp: In function 'int find_maximum_unique(int, int, std::vector<int>, std::vector<int>)':
jelly.cpp:12:15: warning: comparison of integer expressions of different signedness: 'int' and 'std::vector<int>::size_type' {aka 'long unsigned int'} [-Wsign-compare]
   12 |  for(int k=0;k<a.size();k++){
      |              ~^~~~~~~~~
#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...