| # | Time | Username | Problem | Language | Result | Execution time | Memory | 
|---|---|---|---|---|---|---|---|
| 390409 | marat0210 | 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>
#include "molecules.h"
using namespace std;
vector<long long> find_subset(long long l, long long u, vector<long long> w) {
    vector <long long> res;
    long long mi = l / w[0];
    if (mi * w[0] < l and mi <= w.size()) {
        if (mi * w[0] + w[0] >= l and mi * w[0] + w[0] <= u and mi + 1 <= w.size()) {
            for (int i = 0; i < mi + 1; ++i) {
                res.push_back(i);
            }
        }
    }
    else if (mi * w[0] >= l and mi * w[0] <= u and mi <= w.size()) {
        for (int i = 0; i < mi; ++i) {
            res.push_back(i);
        }
    }
    return res;
}
