답안 #233569

# 제출 시각 아이디 문제 언어 결과 실행 시간 메모리
233569 2020-05-21T01:46:40 Z jam_xd_ Detecting Molecules (IOI16_molecules) C++17
0 / 100
7 ms 640 KB
#include "molecules.h"
#include "bits/stdc++.h"

using namespace std;

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


	vector<int>resp;
	vector<int> nada;

	int sum =0 ;
	for(int i=0;i<w.size();i++){
		sum = sum + w[i];
		resp.push_back(i);
		if(sum >= min(u,l) and sum <= max(u,l)){
			return resp;
			break;
		}
		if(sum > max(u,l)){
			return nada;
			break;
		}
	}
	
}
//:v  ??

Compilation message

molecules.cpp: In function 'std::vector<int> find_subset(int, int, std::vector<int>)':
molecules.cpp:13:15: warning: comparison between signed and unsigned integer expressions [-Wsign-compare]
  for(int i=0;i<w.size();i++){
              ~^~~~~~~~~
molecules.cpp:26:1: warning: control reaches end of non-void function [-Wreturn-type]
 }
 ^
# 결과 실행 시간 메모리 Grader output
1 Runtime error 7 ms 640 KB Execution killed with signal 11 (could be triggered by violating memory limits)
2 Halted 0 ms 0 KB -
# 결과 실행 시간 메모리 Grader output
1 Incorrect 4 ms 256 KB Contestant can not find answer, jury can
2 Halted 0 ms 0 KB -
# 결과 실행 시간 메모리 Grader output
1 Runtime error 7 ms 640 KB Execution killed with signal 11 (could be triggered by violating memory limits)
2 Halted 0 ms 0 KB -
# 결과 실행 시간 메모리 Grader output
1 Runtime error 7 ms 640 KB Execution killed with signal 11 (could be triggered by violating memory limits)
2 Halted 0 ms 0 KB -
# 결과 실행 시간 메모리 Grader output
1 Runtime error 7 ms 640 KB Execution killed with signal 11 (could be triggered by violating memory limits)
2 Halted 0 ms 0 KB -
# 결과 실행 시간 메모리 Grader output
1 Runtime error 7 ms 640 KB Execution killed with signal 11 (could be triggered by violating memory limits)
2 Halted 0 ms 0 KB -