# | Time | Username | Problem | Language | Result | Execution time | Memory |
---|---|---|---|---|---|---|---|
777481 | JoenPoenMan | Detecting Molecules (IOI16_molecules) | C++17 | 2 ms | 596 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>
using namespace std;
typedef pair<int, vector<int>> iv;
vector<iv> dp;
std::vector<int> find_subset(int l, int u, std::vector<int> w) {
dp.push_back({0, {}});
for (int i = 0; i < w.size(); i++) {
for (iv eel : dp) {
int we; vector<int> contents;
tie(we, contents) = eel;
if (we+w[i] <= u) {
contents.push_back(i);
if (we+w[i] >= l) return contents;
dp.push_back({we+w[i], contents});
}
}
}
return std::vector<int>(0);
}
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... |