제출 #233775

#제출 시각아이디문제언어결과실행 시간메모리
233775jam_xd_Detecting Molecules (IOI16_molecules)C++17
컴파일 에러
0 ms0 KiB
#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();
//nada.clear();
if(l == 0 and u == 0 and w[0] != 0)return nada;

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

	if(sum >= min(l,u) and sum <= max(l,u)){
		afirmo = true;
		break;
	}
}

if(afirmo == true)return covid;
else return nada;


}
//:v  ??

컴파일 시 표준 에러 (stderr) 메시지

molecules.cpp: In function 'std::vector<int> find_subset(int, int, std::vector<int>)':
molecules.cpp:14:43: error: could not convert 'nada' from 'std::vector<int>()' to 'std::vector<int>'
 if(l == 0 and u == 0 and w[0] != 0)return nada;
                                           ^~~~
molecules.cpp:31:13: error: could not convert 'nada' from 'std::vector<int>()' to 'std::vector<int>'
 else return nada;
             ^~~~