Submission #233820

# Submission time Handle Problem Language Result Execution time Memory
233820 2020-05-21T19:58:16 Z jam_xd_ Detecting Molecules (IOI16_molecules) C++17
0 / 100
5 ms 256 KB
#include "molecules.h"
#include "bits/stdc++.h"

using namespace std;

vector<int> find_subset(int l, int u, vector<int> w) {

int gg = w[0], funcionaaa = w.size(), sum = 0;
bool afirmo;

vector<int>covid;
vector<int>nada;

if((l == u &&  w[0]!= l) || (gg * funcionaaa < min(l,u)) )return nada;
	else{ 
		int guardar = 1;

		for(int i=0; i<funcionaaa; i++){
			sum = sum + gg;
			covid.push_back(guardar);
			guardar++;
			if(sum > max(l,u))break;
			if(sum >= min(l,u) && sum <= max(l,u)){
				afirmo = true;
				break;
			}
			

		}
		sort(covid.begin(), covid.end());
		if(afirmo == true)return covid;
		else return nada;
	}

}
//:v  ??
# Verdict Execution time Memory Grader output
1 Correct 5 ms 256 KB OK (n = 1, answer = NO)
2 Incorrect 4 ms 256 KB Integer 1 violates the range [0, 0]
3 Halted 0 ms 0 KB -
# Verdict Execution time Memory Grader output
1 Incorrect 4 ms 256 KB sum of weights should be in [302..304] but it is 352
2 Halted 0 ms 0 KB -
# Verdict Execution time Memory Grader output
1 Correct 5 ms 256 KB OK (n = 1, answer = NO)
2 Incorrect 4 ms 256 KB Integer 1 violates the range [0, 0]
3 Halted 0 ms 0 KB -
# Verdict Execution time Memory Grader output
1 Correct 5 ms 256 KB OK (n = 1, answer = NO)
2 Incorrect 4 ms 256 KB Integer 1 violates the range [0, 0]
3 Halted 0 ms 0 KB -
# Verdict Execution time Memory Grader output
1 Correct 5 ms 256 KB OK (n = 1, answer = NO)
2 Incorrect 4 ms 256 KB Integer 1 violates the range [0, 0]
3 Halted 0 ms 0 KB -
# Verdict Execution time Memory Grader output
1 Correct 5 ms 256 KB OK (n = 1, answer = NO)
2 Incorrect 4 ms 256 KB Integer 1 violates the range [0, 0]
3 Halted 0 ms 0 KB -