| # | Time | Username | Problem | Language | Result | Execution time | Memory |
|---|---|---|---|---|---|---|---|
| 1325781 | antarbanik | Detecting Molecules (IOI16_molecules) | C++20 | 0 ms | 336 KiB |
#include<bits/stdc++.h>
using namespace std;
#define ll long long
vector<int> find_subset(int l, int u, vector<int> w){
int n = w.size();
vector<int> ans;
bool f = 0;
for(int i = 0;i<n;++i){
vector<int> temp;
ll s = 0;
for(int j = i;j<n;++j){
s += w[j];
temp.push_back(j);
if(s >= l && s <= u){
f = 1;
break;
}
}
if(f){
ans = temp;
break;
}
}
if(!f) ans.clear();
return ans;
}
// int main(){
// vector<int> v = find_subset(6, 10, {1,2,13,4,4});
// for(auto e : v) cout<<e<<" ";
// }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... | ||||
