Submission #434576

#TimeUsernameProblemLanguageResultExecution timeMemory
434576BlagojceJelly Flavours (IOI20_jelly)C++17
11 / 100
2081 ms460 KiB
#include <bits/stdc++.h> #include "jelly.h" //#include "grader.cpp" #include <vector> using namespace std; int N; vector<int> A; vector<int> B; int dp(int pos, int remx, int remy){ if(pos == 0) return 0; int ret = dp(pos-1, remx, remy); if(remx >= A[pos-1]){ ret = max(ret, dp(pos-1, remx-A[pos-1], remy) + 1); } if(remy >= B[pos-1]){ ret = max(ret, dp(pos-1, remx, remy-B[pos-1]) + 1); } return ret; } int find_maximum_unique(int x, int y, std::vector<int> a, std::vector<int> b) { N = a.size(); A = a; B = b; return dp(N, x, y); }
#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...