#include "molecules.h"
#include "bits/stdc++.h"
using namespace std;
vector<int> find_subset(int l, int u, vector<int> w) {
int gg = w[0], funcionaaa = w.size(), sum = 0;
bool afirmo;
vector<int>covid;
vector<int>nada;
//nada.clear();
if(l == 0 and u == 0 and w[0] != 0)return nada;
for(int i=0;i<funcionaaa;i++){
if(sum > max(l,u) or (sum < min(l,u) and i == funcionaaa-1) ){
break;
}
sum = sum + gg;
covid.push_back(i+1);
if(sum >= min(l,u) and sum <= max(l,u)){
afirmo = true;
break;
}
}
if(afirmo == true)return covid;
else return nada;
}
//:v ??
# |
결과 |
실행 시간 |
메모리 |
Grader output |
1 |
Correct |
4 ms |
256 KB |
OK (n = 1, answer = NO) |
2 |
Correct |
5 ms |
256 KB |
OK (n = 1, answer = NO) |
3 |
Incorrect |
4 ms |
384 KB |
Contestant can not find answer, jury can |
4 |
Halted |
0 ms |
0 KB |
- |
# |
결과 |
실행 시간 |
메모리 |
Grader output |
1 |
Incorrect |
4 ms |
256 KB |
sum of weights should be in [302..304] but it is 352 |
2 |
Halted |
0 ms |
0 KB |
- |
# |
결과 |
실행 시간 |
메모리 |
Grader output |
1 |
Correct |
4 ms |
256 KB |
OK (n = 1, answer = NO) |
2 |
Correct |
5 ms |
256 KB |
OK (n = 1, answer = NO) |
3 |
Incorrect |
4 ms |
384 KB |
Contestant can not find answer, jury can |
4 |
Halted |
0 ms |
0 KB |
- |
# |
결과 |
실행 시간 |
메모리 |
Grader output |
1 |
Correct |
4 ms |
256 KB |
OK (n = 1, answer = NO) |
2 |
Correct |
5 ms |
256 KB |
OK (n = 1, answer = NO) |
3 |
Incorrect |
4 ms |
384 KB |
Contestant can not find answer, jury can |
4 |
Halted |
0 ms |
0 KB |
- |
# |
결과 |
실행 시간 |
메모리 |
Grader output |
1 |
Correct |
4 ms |
256 KB |
OK (n = 1, answer = NO) |
2 |
Correct |
5 ms |
256 KB |
OK (n = 1, answer = NO) |
3 |
Incorrect |
4 ms |
384 KB |
Contestant can not find answer, jury can |
4 |
Halted |
0 ms |
0 KB |
- |
# |
결과 |
실행 시간 |
메모리 |
Grader output |
1 |
Correct |
4 ms |
256 KB |
OK (n = 1, answer = NO) |
2 |
Correct |
5 ms |
256 KB |
OK (n = 1, answer = NO) |
3 |
Incorrect |
4 ms |
384 KB |
Contestant can not find answer, jury can |
4 |
Halted |
0 ms |
0 KB |
- |