Submission #23679

# Submission time Handle Problem Language Result Execution time Memory
23679 2017-05-19T12:24:23 Z Nirjhor Detecting Molecules (IOI16_molecules) C++14
0 / 100
0 ms 2024 KB
#include <bits/stdc++.h>
#include <bits/stdc++.h>
#include "molecules.h"

using namespace std;

typedef long long ll;

vector <int> find_subset (int l, int u, vector <int> w) {
  int n = w.size();
  sort(w.begin(), w.end());
  ll sum = 0;
  vector <int> r;
  for (int i = 0, j = 0; j < n; ++j) {
		sum += (ll) w[j];
  	while (sum > u) {
  		sum -= w[i++];
  	}
  	if (sum >= l) {
			for (int k = i; k <= j; ++k) {
				r.push_back(w[k]);
			}
			break;
		}
  }
  return r;
}
# Verdict Execution time Memory Grader output
1 Correct 0 ms 2024 KB OK (n = 1, answer = NO)
2 Correct 0 ms 2024 KB OK (n = 1, answer = NO)
3 Incorrect 0 ms 2024 KB Integer 10 violates the range [0, 0]
4 Halted 0 ms 0 KB -
# Verdict Execution time Memory Grader output
1 Incorrect 0 ms 2024 KB Integer 50 violates the range [0, 11]
2 Halted 0 ms 0 KB -
# Verdict Execution time Memory Grader output
1 Correct 0 ms 2024 KB OK (n = 1, answer = NO)
2 Correct 0 ms 2024 KB OK (n = 1, answer = NO)
3 Incorrect 0 ms 2024 KB Integer 10 violates the range [0, 0]
4 Halted 0 ms 0 KB -
# Verdict Execution time Memory Grader output
1 Correct 0 ms 2024 KB OK (n = 1, answer = NO)
2 Correct 0 ms 2024 KB OK (n = 1, answer = NO)
3 Incorrect 0 ms 2024 KB Integer 10 violates the range [0, 0]
4 Halted 0 ms 0 KB -
# Verdict Execution time Memory Grader output
1 Correct 0 ms 2024 KB OK (n = 1, answer = NO)
2 Correct 0 ms 2024 KB OK (n = 1, answer = NO)
3 Incorrect 0 ms 2024 KB Integer 10 violates the range [0, 0]
4 Halted 0 ms 0 KB -
# Verdict Execution time Memory Grader output
1 Correct 0 ms 2024 KB OK (n = 1, answer = NO)
2 Correct 0 ms 2024 KB OK (n = 1, answer = NO)
3 Incorrect 0 ms 2024 KB Integer 10 violates the range [0, 0]
4 Halted 0 ms 0 KB -