| # | Time | Username | Problem | Language | Result | Execution time | Memory | 
|---|---|---|---|---|---|---|---|
| 982598 | THXuan | Detecting Molecules (IOI16_molecules) | C++14 | 42 ms | 10188 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 "molecules.h"
#include <bits/stdc++.h>
#define INF 1e9
using namespace std;
typedef long long ll;
vector<int> find_subset(int l, int u, vector<int> w) {
    vector<pair<ll,ll>>v;
    for(int i =0;i<w.size();i++) v.push_back({w[i], i});
    sort(v.begin(), v.end());
    ll sum = 0;
    int j = 0;
    vector<int>ans;
    for(int i =0;i<w.size();i++){
        sum += v[i].first;
        while(sum > u){
            sum -= v[j].first;
            ++j;
        }
        if(sum >= l){
            for(int k = j;k<=i;k++)ans.push_back(v[k].second);
            break;
        }
    }
    return ans;
}
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... | ||||
