| # | Time | Username | Problem | Language | Result | Execution time | Memory |
|---|---|---|---|---|---|---|---|
| 1354583 | takoshanava | Detecting Molecules (IOI16_molecules) | C++20 | 0 ms | 344 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) {
sort(w.begin(), w.end());
int l1 = 0, r = 0;
int sum = 0;
bool ok = 0;
int n = w.size();
while(r < n){
if(sum >= l and sum <= u){ok = 1; break;}
if(sum < l) r++, sum += w[r];
if(sum > u) l++, sum -= w[l1];
}
vector<int> ans;
if(!ok) return ans;
for(int i = l1; i < r; i++) ans.pb(i + 1);
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... | ||||
