| # | Time | Username | Problem | Language | Result | Execution time | Memory |
|---|---|---|---|---|---|---|---|
| 1299582 | gesp3011v2 | Detecting Molecules (IOI16_molecules) | C++20 | 0 ms | 0 KiB |
#include "bits/stdc++.h"
using namespace std;
#include "molecules.h"
vector<int> find_subset(int l,int u,vector<int> w){
int n=w.size();
int s=0;
for(int i=0,j=0;j<n;j++){
s+=w[r];
while(s>u){
s-=w[i];
i++;
}
if(s<=u && s>=l){
vector<int> ans;
for(int k=i;k<=r;k++)ans.push_back(k);
return ans;
}
}
return {};
}
