| # | Time | Username | Problem | Language | Result | Execution time | Memory |
|---|---|---|---|---|---|---|---|
| 498275 | OrazB | Detecting Molecules (IOI16_molecules) | C++14 | 1 ms | 204 KiB |
This submission is migrated from previous version of oj.uz, which used different machine for grading. This submission may have different result if resubmitted.
#include <bits/stdc++.h>
#define N 100005
#define ll long long int
#define pii pair <long long, long long>
#define pb push_back
#define ff first
#define ss second
using namespace std;
vector <int> find_subset(int l, int u, vector <int> w){
ll sm = 0, tr = 0;
vector <pii> v;
vector <int> ans;
for (int i = 0; i < w.size(); i++) v.pb({w[i], i});
sort (v.begin(), v.end());
for (int i = 0; i < v.size(); i++){
sm += v[i].ff;
ans.pb(v[i].ss);
if (sm >= l and sm <= u){tr = 1; break;}
}
if (!tr) ans.clear();
return ans;
}
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... | ||||
