답안 #233831

# 제출 시각 아이디 문제 언어 결과 실행 시간 메모리
233831 2020-05-21T21:29:37 Z jam_xd_ Detecting Molecules (IOI16_molecules) C++17
0 / 100
4 ms 384 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;



for(int i=0;i<funcionaaa;i++){
	if(sum + w[i] <= min(l,u)){
		sum = sum + w[i];
		covid.push_back(i);
	}
	if(sum >= max(l,u)){
		return covid;//nada
	}
}
return covid;
}
//:v  ??
//wEy Ya :"v aiuda xd   SOLO QUIERO 9 PUNTOS >:V

Compilation message

molecules.cpp: In function 'std::vector<int> find_subset(int, int, std::vector<int>)':
molecules.cpp:8:5: warning: unused variable 'gg' [-Wunused-variable]
 int gg = w[0], funcionaaa = w.size(), sum = 0;
     ^~
molecules.cpp:9:6: warning: unused variable 'afirmo' [-Wunused-variable]
 bool afirmo;
      ^~~~~~
# 결과 실행 시간 메모리 Grader output
1 Incorrect 4 ms 384 KB sum of weights should be in [10..12] but it is 9
2 Halted 0 ms 0 KB -
# 결과 실행 시간 메모리 Grader output
1 Incorrect 4 ms 256 KB sum of weights should be in [302..304] but it is 300
2 Halted 0 ms 0 KB -
# 결과 실행 시간 메모리 Grader output
1 Incorrect 4 ms 384 KB sum of weights should be in [10..12] but it is 9
2 Halted 0 ms 0 KB -
# 결과 실행 시간 메모리 Grader output
1 Incorrect 4 ms 384 KB sum of weights should be in [10..12] but it is 9
2 Halted 0 ms 0 KB -
# 결과 실행 시간 메모리 Grader output
1 Incorrect 4 ms 384 KB sum of weights should be in [10..12] but it is 9
2 Halted 0 ms 0 KB -
# 결과 실행 시간 메모리 Grader output
1 Incorrect 4 ms 384 KB sum of weights should be in [10..12] but it is 9
2 Halted 0 ms 0 KB -