Submission #737808

#TimeUsernameProblemLanguageResultExecution timeMemory
737808Elvin_FritlDetecting Molecules (IOI16_molecules)C++17
0 / 100
1 ms340 KiB
#include <bits/stdc++.h> using namespace std; #include "molecules.h" const int MN=1e5+5; vector<int> find_subset(int l, int u, vector<int> w){ vector<bool>dp(MN,false); int n=w.size(); dp[0]=true; vector<vector<int>>res; for(int i=0;i<n;i++){ for(int j=MN;j>=0;j--){ if(j<w[j]){ break; } if(dp[j-w[i]]==true){ res[j]=res[j-w[i]]; dp[j]=true; res[j].push_back(i); } } } for(int i=l;i<=u;i++){ if(dp[i]==true){ return res[i]; } } return vector<int>(0); }
#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...