#include <bits/stdc++.h>
#ifndef ARTHUR_LOCAL
#include "molecules.h"
#endif
using namespace std;
vector<int> find_subset(int l, int u, vector<int> W)
{
vector<int> use;
int cur = 0;
for(auto w:W)
{
if(w>=l && w<=u)
{
return {w};
}
if(w<l)
{
use.push_back(w);
cur += w;
if(cur > u) break;
}
}
while(cur>u)
{
if(use.empty()) return {};
cur -= use.back();
use.pop_back();
}
if(use.empty()) return {};
else return use;
}
# |
Verdict |
Execution time |
Memory |
Grader output |
1 |
Incorrect |
2 ms |
380 KB |
Integer 9 violates the range [0, 0] |
2 |
Halted |
0 ms |
0 KB |
- |
# |
Verdict |
Execution time |
Memory |
Grader output |
1 |
Incorrect |
2 ms |
376 KB |
Integer 50 violates the range [0, 11] |
2 |
Halted |
0 ms |
0 KB |
- |
# |
Verdict |
Execution time |
Memory |
Grader output |
1 |
Incorrect |
2 ms |
380 KB |
Integer 9 violates the range [0, 0] |
2 |
Halted |
0 ms |
0 KB |
- |
# |
Verdict |
Execution time |
Memory |
Grader output |
1 |
Incorrect |
2 ms |
380 KB |
Integer 9 violates the range [0, 0] |
2 |
Halted |
0 ms |
0 KB |
- |
# |
Verdict |
Execution time |
Memory |
Grader output |
1 |
Incorrect |
2 ms |
380 KB |
Integer 9 violates the range [0, 0] |
2 |
Halted |
0 ms |
0 KB |
- |
# |
Verdict |
Execution time |
Memory |
Grader output |
1 |
Incorrect |
2 ms |
380 KB |
Integer 9 violates the range [0, 0] |
2 |
Halted |
0 ms |
0 KB |
- |