Submission #265576

# Submission time Handle Problem Language Result Execution time Memory
265576 2020-08-15T02:08:04 Z cjoa Detecting Molecules (IOI16_molecules) C++11
0 / 100
88 ms 65540 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; ++i)
            res.push_back(j+1);
         return res;
      }
   }

   return {};
}
# Verdict Execution time Memory Grader output
1 Correct 0 ms 256 KB OK (n = 1, answer = NO)
2 Correct 0 ms 256 KB OK (n = 1, answer = NO)
3 Runtime error 88 ms 65540 KB Execution killed with signal 9
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 0 ms 256 KB OK (n = 1, answer = NO)
2 Correct 0 ms 256 KB OK (n = 1, answer = NO)
3 Runtime error 88 ms 65540 KB Execution killed with signal 9
4 Halted 0 ms 0 KB -
# Verdict Execution time Memory Grader output
1 Correct 0 ms 256 KB OK (n = 1, answer = NO)
2 Correct 0 ms 256 KB OK (n = 1, answer = NO)
3 Runtime error 88 ms 65540 KB Execution killed with signal 9
4 Halted 0 ms 0 KB -
# Verdict Execution time Memory Grader output
1 Correct 0 ms 256 KB OK (n = 1, answer = NO)
2 Correct 0 ms 256 KB OK (n = 1, answer = NO)
3 Runtime error 88 ms 65540 KB Execution killed with signal 9
4 Halted 0 ms 0 KB -
# Verdict Execution time Memory Grader output
1 Correct 0 ms 256 KB OK (n = 1, answer = NO)
2 Correct 0 ms 256 KB OK (n = 1, answer = NO)
3 Runtime error 88 ms 65540 KB Execution killed with signal 9
4 Halted 0 ms 0 KB -