Submission #265579

# Submission time Handle Problem Language Result Execution time Memory
265579 2020-08-15T02:08:50 Z cjoa Detecting Molecules (IOI16_molecules) C++11
0 / 100
1 ms 256 KB
#include "molecules.h"

#include <vector>
#include <algorithm>
#include <utility>
#include <numeric>
#include <cassert>
#include <cstdio>

using namespace std;

typedef pair<int,int> II;

std::vector<int> find_subset(int l, int u, std::vector<int> w) {
   const int N = w.size();

   long long sum = 0;
   for (int i = 0; i < N; ++i) {
      sum += w[i];
      if (l <= sum && sum <= u) {
         vector<int> res;
         for (int j = 0; j <= i; ++j)
            res.push_back(j+1);
         return res;
      }
   }

   return {};
}
# 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 Contestant can not find answer, jury can
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 -