| # | Time | Username | Problem | Language | Result | Execution time | Memory | 
|---|---|---|---|---|---|---|---|
| 105488 | polyfish | Detecting Molecules (IOI16_molecules) | C++14 | 72 ms | 8296 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.
//Pantyhose(black) + glasses = infinity
#include <bits/stdc++.h>
using namespace std;
 
#define debug(x) cerr << #x << " = " << x << '\n';
#define BP() cerr << "OK!\n";
#define PR(A, n) {cerr << #A << " = "; for (int64_t _=1; _<=n; ++_) cerr << A[_] << ' '; cerr << '\n';}
#define PR0(A, n) {cerr << #A << " = "; for (int64_t _=0; _<n; ++_) cerr << A[_] << ' '; cerr << '\n';}
#define FILE_NAME "data"
vector<int> find_subset(int L, int R, vector<int> w) {
	vector<pair<int64_t, int64_t> > a;
	int64_t l = L, r = R;
	for (int64_t i=0; i<w.size(); ++i)
		a.push_back({w[i], i});
	sort(a.begin(), a.end());
	for (int64_t i=0, head=-1, cur_sum=0; i<a.size(); ++i) {
		while (head+1<a.size() && cur_sum<l)
			cur_sum += a[++head].first;
		if (cur_sum>=l && cur_sum<=r) {
			vector<int> res;
			for (int j=i; j<=head; ++j)
				res.push_back(a[j].second);
			return res;
		}
		cur_sum -= a[i].first;
	}
	return {};
}
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... | ||||
