# | Submission time | Handle | Problem | Language | Result | Execution time | Memory |
---|---|---|---|---|---|---|---|
313849 | 2020-10-17T07:14:15 Z | IWANTTOGETGOLDINIOI | Detecting Molecules (IOI16_molecules) | C++14 | 1 ms | 384 KB |
#include "molecules.h" #include <iostream> #include <vector> #include <utility> #include <algorithm> std::vector<int> find_subset(int l, int u, std::vector<int> w) { int n = w.size(); std::vector <std::pair <int , int> > subset; for (int i = 0;i < n;i++) { for (int j = 0;j < n; j++ ) { subset.push_back(std::make_pair (i , j)); } } std::vector <int> ans; for (int i = 0;i < subset.size(); i++) { int sum = 0; for (int j = std::min (subset[i].first , subset[i].second) ;j < std::max(subset[i].second,subset[i].first); j++) { sum += w[j]; } ans.clear(); if (sum >= l && sum <= u) { for (int k = subset[i].first;k < subset[i].second;k++) { ans.push_back(w[k]); } return ans; } } return ans; }
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 | 1 ms | 384 KB | Contestant can not find answer, jury can |
4 | Halted | 0 ms | 0 KB | - |
# | Verdict | Execution time | Memory | Grader output |
---|---|---|---|---|
1 | Incorrect | 0 ms | 256 KB | Integer 50 violates the range [0, 11] |
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 | 1 ms | 384 KB | Contestant can not find answer, jury can |
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 | 1 ms | 384 KB | Contestant can not find answer, jury can |
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 | 1 ms | 384 KB | Contestant can not find answer, jury can |
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 | 1 ms | 384 KB | Contestant can not find answer, jury can |
4 | Halted | 0 ms | 0 KB | - |