# | Time | Username | Problem | Language | Result | Execution time | Memory |
---|---|---|---|---|---|---|---|
239261 | urd05 | Detecting Molecules (IOI16_molecules) | C++14 | 86 ms | 8696 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 <bits/stdc++.h>
using namespace std;
long long dp[10001][170];
bool val(int x,int y) {
return (dp[x][y/64]>>(y%64))&1;
}
typedef pair<long long,int> P;
vector<int> find_subset(int l, int u,vector<int> w) {
vector<P> copy(w.size());
for(int i=0;i<w.size();i++) {
copy[i]=P(w[i],i);
}
sort(w.begin(),w.end());
sort(copy.begin(),copy.end());
long long psum[200001];
psum[0]=0;
int n=w.size();
for(int i=1;i<=n;i++) {
psum[i]=psum[i-1]+w[i-1];
}
for(int j=0;j<n;j++) {
auto iter=lower_bound(psum+j+1,psum+n+1,l+psum[j]);
if (iter!=psum+n+1&&(*iter)<=u+psum[j]) {
int i=lower_bound(psum+j+1,psum+n+1,l+psum[j])-psum;
vector<int> ret;
for(int k=j;k<i;k++) {
ret.push_back(copy[k].second);
}
return ret;
}
}
vector<int> ret;
return ret;
}
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... |