Submission #241674

# Submission time Handle Problem Language Result Execution time Memory
241674 2020-06-25T08:30:40 Z godwind Detecting Molecules (IOI16_molecules) C++14
0 / 100
5 ms 256 KB
#include <iostream>
#include <vector>
#include <algorithm>
#include <set>
#include <map>
#include <cstring>
#include <cmath>
#include <functional>
#include "molecules.h"

using namespace std;

vector<int> find_subset(int l, int u, vector<int> w) {
	vector<int> answer;
	int cur = 0;
	for (int i = 0; i < (int)w.size(); ++i) {
		if (cur < l) {
			cur += w[i];
			answer.emplace_back(i);
		}
	}
	if (l <= cur && cur <= u) answer.clear();
	return answer;
}
# Verdict Execution time Memory Grader output
1 Incorrect 5 ms 256 KB sum of weights should be in [10..12] but it is 9
2 Halted 0 ms 0 KB -
# Verdict Execution time Memory Grader output
1 Incorrect 5 ms 256 KB sum of weights should be in [302..304] but it is 351
2 Halted 0 ms 0 KB -
# Verdict Execution time Memory Grader output
1 Incorrect 5 ms 256 KB sum of weights should be in [10..12] but it is 9
2 Halted 0 ms 0 KB -
# Verdict Execution time Memory Grader output
1 Incorrect 5 ms 256 KB sum of weights should be in [10..12] but it is 9
2 Halted 0 ms 0 KB -
# Verdict Execution time Memory Grader output
1 Incorrect 5 ms 256 KB sum of weights should be in [10..12] but it is 9
2 Halted 0 ms 0 KB -
# Verdict Execution time Memory Grader output
1 Incorrect 5 ms 256 KB sum of weights should be in [10..12] but it is 9
2 Halted 0 ms 0 KB -