제출 #639968

#제출 시각아이디문제언어결과실행 시간메모리
639968rc_catuntaDetecting Molecules (IOI16_molecules)C++17
9 / 100
1 ms212 KiB
#include "molecules.h" #include <vector> using namespace std; vector<int> find_subset(int l, int u, vector<int> w) { int suma = 0; vector<int> res; for(int i=0;i<w.size();i++){ suma+=w[i]; res.push_back(i); if(suma>=l and suma<=u) return res; } res.clear(); return res; }

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

molecules.cpp: In function 'std::vector<int> find_subset(int, int, std::vector<int>)':
molecules.cpp:9:18: warning: comparison of integer expressions of different signedness: 'int' and 'std::vector<int>::size_type' {aka 'long unsigned int'} [-Wsign-compare]
    9 |     for(int i=0;i<w.size();i++){
      |                 ~^~~~~~~~~
#Verdict Execution timeMemoryGrader output
Fetching results...
#Verdict Execution timeMemoryGrader output
Fetching results...
#Verdict Execution timeMemoryGrader output
Fetching results...
#Verdict Execution timeMemoryGrader output
Fetching results...
#Verdict Execution timeMemoryGrader output
Fetching results...
#Verdict Execution timeMemoryGrader output
Fetching results...