| # | Time | Username | Problem | Language | Result | Execution time | Memory |
|---|---|---|---|---|---|---|---|
| 1356588 | dreamofsecretuniverse | Detecting Molecules (IOI16_molecules) | C++20 | 29 ms | 4148 KiB |
#include "molecules.h"
#include <bits/stdc++.h>
using namespace std;
#define ll long long int
std::vector<int> find_subset(int l, int u, std::vector<int> w) {
vector<int> res;
vector<pair<int, int>> a;
int n = w.size();
for(int i = 0; i < n; ++i) a.emplace_back(w[i], i);
int i = 0, j = 0;
sort(a.begin(), a.end());
ll cur = 0;
while(j<n){
cur += 1LL*a[j].first;
while(cur>u){
cur -= 1LL*a[i].first;
++i;
}
if(cur>=l){
for(int k = i; k <= j; ++k){
res.push_back(a[k].second);
}
break;
}
++j;
}
return res;
}
| # | 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... | ||||
