제출 #889138

#제출 시각아이디문제언어결과실행 시간메모리
889138Sir_Ahmed_ImranDetecting Molecules (IOI16_molecules)C++17
19 / 100
3 ms604 KiB
///~~~LOTA~~~/// #include <bits/stdc++.h> using namespace std; vector<int> find_subset(int l,int r,vector<int> w){ bitset<500001> dp; int n=w.size(); dp[0]=1; for(auto& i:w) dp|=dp<<i; int o=0; for(int i=l;i<=r;i++) if(dp[i]) o=i; vector<int> v; for(int i=0;i<n;i++){ if(w[i]>o) continue; if(dp[o-w[i]]){ o-=w[i]; v.push_back(i); } } return v; }
#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...