# | Time | Username | Problem | Language | Result | Execution time | Memory |
---|---|---|---|---|---|---|---|
1136248 | alterio | Detecting Molecules (IOI16_molecules) | C++20 | 1 ms | 328 KiB |
#include "molecules.h"
#include <bits/stdc++.h>
using namespace std;
vector<int> find_subset(int l, int u, vector<int> w) {
int n = w.size();
int R = 0, sum = 0;
for (int L = 0; L < n;) {
while (sum < l && R < n) {
sum += w[R];
R++;
}
if (sum < l) break;
if (sum > u) {
sum -= w[L];
L++;
continue;
}
vector<int> ans;
for (int i = L; i < R; i++) ans.push_back(i);
return ans;
}
return {};
}
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... |