Submission #943832

# Submission time Handle Problem Language Result Execution time Memory
943832 2024-03-12T02:03:52 Z ezzzay Detecting Molecules (IOI16_molecules) C++14
0 / 100
1 ms 348 KB
#include "molecules.h"
#include<bits/stdc++.h>
using namespace std;
const int N=2e5+5;
#define pb push_back
#define ff first
#define ss second
std::vector<int> find_subset(int l, int u, std::vector<int> w) {
    int n=w.size();
	vector<int>dp[1002];
	for(int i=0;i<n;i++){
		for(int j=100-w[i];j>=0;j--){
			if(!dp[j].empty() and dp[j+w[i]].empty()){
				dp[j+w[i]]=dp[j];
				dp[j+w[i]].pb(i+1);
			}
		}
		dp[w[i]].pb(i+1);
	}
	for(int i=l;i<=u;i++){
		if(!dp[i].empty())return dp[i];
	}
	vector<int>vc;
	return vc;
}
# Verdict Execution time Memory Grader output
1 Correct 0 ms 348 KB OK (n = 1, answer = NO)
2 Correct 0 ms 348 KB OK (n = 1, answer = NO)
3 Incorrect 1 ms 348 KB Integer 1 violates the range [0, 0]
4 Halted 0 ms 0 KB -
# Verdict Execution time Memory Grader output
1 Incorrect 0 ms 348 KB Contestant can not find answer, jury can
2 Halted 0 ms 0 KB -
# Verdict Execution time Memory Grader output
1 Correct 0 ms 348 KB OK (n = 1, answer = NO)
2 Correct 0 ms 348 KB OK (n = 1, answer = NO)
3 Incorrect 1 ms 348 KB Integer 1 violates the range [0, 0]
4 Halted 0 ms 0 KB -
# Verdict Execution time Memory Grader output
1 Correct 0 ms 348 KB OK (n = 1, answer = NO)
2 Correct 0 ms 348 KB OK (n = 1, answer = NO)
3 Incorrect 1 ms 348 KB Integer 1 violates the range [0, 0]
4 Halted 0 ms 0 KB -
# Verdict Execution time Memory Grader output
1 Correct 0 ms 348 KB OK (n = 1, answer = NO)
2 Correct 0 ms 348 KB OK (n = 1, answer = NO)
3 Incorrect 1 ms 348 KB Integer 1 violates the range [0, 0]
4 Halted 0 ms 0 KB -
# Verdict Execution time Memory Grader output
1 Correct 0 ms 348 KB OK (n = 1, answer = NO)
2 Correct 0 ms 348 KB OK (n = 1, answer = NO)
3 Incorrect 1 ms 348 KB Integer 1 violates the range [0, 0]
4 Halted 0 ms 0 KB -