This submission is migrated from previous version of oj.uz, which used different machine for grading. This submission may have different result if resubmitted.
// from duckindog wth depression
#include<bits/stdc++.h>
using namespace std;
//#define LOCAL
#ifndef LOCAL
#include "molecules.h"
#endif // LOCAL
struct T {
int a, b;
T(int aa, int bb) : a(aa), b(bb) {}
};
vector<int> find_subset(int l, int u, vector<int> w) {
if (w[0] > u) return {};
int sum = 0;
int x = u / w[0];
for (int i = 0; i < min(x, int(w.size())); ++i) sum += w[i];
if (l <= sum && sum <= u) {
vector<int> answer;
for (int i = 0; i < x; ++i) answer.push_back(i);
return answer;
}
return {};
}
#ifdef LOCAL
int32_t main() {
cin.tie(0)->sync_with_stdio(0);
if (fopen("duck.inp", "r")) {
freopen("duck.inp", "r", stdin);
freopen("duck.out", "w", stdout);
}
}
#endif // LOCAL
# | 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... |