# | Submission time | Handle | Problem | Language | Result | Execution time | Memory |
---|---|---|---|---|---|---|---|
169968 | 2019-12-23T12:58:15 Z | whttt | Detecting Molecules (IOI16_molecules) | C++14 | 2 ms | 504 KB |
#include <iostream> #include <vector> #include <algorithm> #define ll long long using namespace std; int* find_subset(int l, int u, vector<int> w){ ll sum = 0; vector<int> returnThis; sort(w.begin(), w.end()); for(ll i = 0;i < w.size();i++){ sum += w[i]; if(sum <= u && sum >= l){ for(ll j = 0;j <= i;j++){ returnThis.push_back(w[i]); } return &returnThis[0]; } else if(sum > l){ sum -= w[i]; for(ll j = i;j < w.size();j++){ sum += w[j]-w[j-i]; if(sum <= u && sum >= l){ for(ll j = 0;j <= i;j++){ returnThis.push_back(w[i]); } return &returnThis[0]; } if(j == w.size()-1){ return {}; } } } } return {}; }
Compilation message
# | Verdict | Execution time | Memory | Grader output |
---|---|---|---|---|
1 | Runtime error | 2 ms | 376 KB | Execution killed with signal 11 (could be triggered by violating memory limits) |
2 | Halted | 0 ms | 0 KB | - |
# | Verdict | Execution time | Memory | Grader output |
---|---|---|---|---|
1 | Runtime error | 2 ms | 504 KB | Execution killed with signal 11 (could be triggered by violating memory limits) |
2 | Halted | 0 ms | 0 KB | - |
# | Verdict | Execution time | Memory | Grader output |
---|---|---|---|---|
1 | Runtime error | 2 ms | 376 KB | Execution killed with signal 11 (could be triggered by violating memory limits) |
2 | Halted | 0 ms | 0 KB | - |
# | Verdict | Execution time | Memory | Grader output |
---|---|---|---|---|
1 | Runtime error | 2 ms | 376 KB | Execution killed with signal 11 (could be triggered by violating memory limits) |
2 | Halted | 0 ms | 0 KB | - |
# | Verdict | Execution time | Memory | Grader output |
---|---|---|---|---|
1 | Runtime error | 2 ms | 376 KB | Execution killed with signal 11 (could be triggered by violating memory limits) |
2 | Halted | 0 ms | 0 KB | - |
# | Verdict | Execution time | Memory | Grader output |
---|---|---|---|---|
1 | Runtime error | 2 ms | 376 KB | Execution killed with signal 11 (could be triggered by violating memory limits) |
2 | Halted | 0 ms | 0 KB | - |