# | Submission time | Handle | Problem | Language | Result | Execution time | Memory |
---|---|---|---|---|---|---|---|
284601 | 2020-08-27T17:21:33 Z | triplem5ds | Detecting Molecules (IOI16_molecules) | C++14 | 1 ms | 256 KB |
#include "molecules.h" #include "bits/stdc++.h" using namespace std; std::vector<int> find_subset(int l, int u, std::vector<int> w) { vector<int> v; for(int i = 0; i < w.size(); i++)v.push_back(i); sort(v.begin(),v.end(), [&](int x, int y){return w[x] < w[y];}); if(accumulate(w.begin(),w.end(),0ll) < l || w[v[0]] > u)return vector<int>(); vector<int> ret; int sum = 0; for(int j = 0; sum < l; j++){ sum += w[v[j]]; ret.push_back(v[j] + 1); } return ret; }
Compilation message
# | Verdict | Execution time | Memory | Grader output |
---|---|---|---|---|
1 | Correct | 1 ms | 256 KB | OK (n = 1, answer = NO) |
2 | Correct | 0 ms | 256 KB | OK (n = 1, answer = NO) |
3 | Incorrect | 0 ms | 256 KB | Integer 1 violates the range [0, 0] |
4 | Halted | 0 ms | 0 KB | - |
# | Verdict | Execution time | Memory | Grader output |
---|---|---|---|---|
1 | Incorrect | 0 ms | 256 KB | sum of weights should be in [302..304] but it is 352 |
2 | Halted | 0 ms | 0 KB | - |
# | Verdict | Execution time | Memory | Grader output |
---|---|---|---|---|
1 | Correct | 1 ms | 256 KB | OK (n = 1, answer = NO) |
2 | Correct | 0 ms | 256 KB | OK (n = 1, answer = NO) |
3 | Incorrect | 0 ms | 256 KB | Integer 1 violates the range [0, 0] |
4 | Halted | 0 ms | 0 KB | - |
# | Verdict | Execution time | Memory | Grader output |
---|---|---|---|---|
1 | Correct | 1 ms | 256 KB | OK (n = 1, answer = NO) |
2 | Correct | 0 ms | 256 KB | OK (n = 1, answer = NO) |
3 | Incorrect | 0 ms | 256 KB | Integer 1 violates the range [0, 0] |
4 | Halted | 0 ms | 0 KB | - |
# | Verdict | Execution time | Memory | Grader output |
---|---|---|---|---|
1 | Correct | 1 ms | 256 KB | OK (n = 1, answer = NO) |
2 | Correct | 0 ms | 256 KB | OK (n = 1, answer = NO) |
3 | Incorrect | 0 ms | 256 KB | Integer 1 violates the range [0, 0] |
4 | Halted | 0 ms | 0 KB | - |
# | Verdict | Execution time | Memory | Grader output |
---|---|---|---|---|
1 | Correct | 1 ms | 256 KB | OK (n = 1, answer = NO) |
2 | Correct | 0 ms | 256 KB | OK (n = 1, answer = NO) |
3 | Incorrect | 0 ms | 256 KB | Integer 1 violates the range [0, 0] |
4 | Halted | 0 ms | 0 KB | - |