| # | Time | Username | Problem | Language | Result | Execution time | Memory |
|---|---|---|---|---|---|---|---|
| 1354613 | takoshanava | Detecting Molecules (IOI16_molecules) | C++20 | 27 ms | 4124 KiB |
#include <bits/stdc++.h>
#include "molecules.h"
#define pb push_back
#define fs first
#define sc second
using namespace std;
vector<int> find_subset(int l, int u, vector<int> w) {
int n = w.size();
vector<pair<int, int>> p;
for(int i=0; i<n; i++) p.pb({w[i], i});
sort(p.begin(), p.end());
vector<int> ans;
long long sum = 0;
int j = 0;
for(int i = 0; i < n; i++){
sum += p[i].fs;
while(j <= i and sum > u){
sum -= p[j].fs;
j++;
}
if(sum >= l and sum <= u){
for(int h = j; h <= i; h++){
ans.pb(p[h].sc);
}
return ans;
}
}
return ans;
}| # | Result | Execution time | Memory | Grader output |
|---|---|---|---|---|
| Fetching results... | ||||
| # | Result | Execution time | Memory | Grader output |
|---|---|---|---|---|
| Fetching results... | ||||
| # | Result | Execution time | Memory | Grader output |
|---|---|---|---|---|
| Fetching results... | ||||
| # | Result | Execution time | Memory | Grader output |
|---|---|---|---|---|
| Fetching results... | ||||
| # | Result | Execution time | Memory | Grader output |
|---|---|---|---|---|
| Fetching results... | ||||
| # | Result | Execution time | Memory | Grader output |
|---|---|---|---|---|
| Fetching results... | ||||
