| # | Time | Username | Problem | Language | Result | Execution time | Memory | 
|---|---|---|---|---|---|---|---|
| 317272 | analyticalprogrammer | Detecting Molecules (IOI16_molecules) | C++14 | 0 ms | 0 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;
int find_subset(int l, int u, int[] w, int n, int[] result){
  int start = 0;
  for(int end =0 ;end<n;end++){
    queue<int> subset;
    int cursum = 0;
    for(int i =start;i<end-start+1;i++){
      cursum+=w[i];
      subset.push(w[i]);
    }
    if(cursum>=l &&<=u){
      break;
    }
    else if(cursum>u){
      subset.pop();
      start++;
    }
  }
  int index= 0 ;
  for(auto i =subset.front(); i != subset.back(); i++)
    {
      result[index] = i;
            index++;
    }
    return result;
}
