| # | Time | Username | Problem | Language | Result | Execution time | Memory |
|---|---|---|---|---|---|---|---|
| 1354615 | putuputu | Detecting Molecules (IOI16_molecules) | C++20 | 24 ms | 3496 KiB |
#include<bits/stdc++.h>
using namespace std;
//#include "molecules.h"
vector<int> find_subset(int l, int u, vector<int> w){
int n=(int)w.size();
vector< pair < int, int > > a(n, {0, -1});
for(int i=0; i<n; i++){
a[i].first=w[i];
a[i].second=i;
}
vector<int> ans;
sort(a.begin(), a.end());
int ll=0;
int sum=0;
queue<int> q;
for(int r=0; r<n; r++){
sum+=a[r].first;
while(sum>u and ll<=r ){
sum-=a[ll].first;
ll++;
}
if(sum>=l and sum<=u){
for(int i=ll; i<=r; i++){
ans.push_back(a[i].second);
}
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... | ||||
