제출 #958934

#제출 시각아이디문제언어결과실행 시간메모리
958934IUA_HasinDetecting Molecules (IOI16_molecules)C++17
0 / 100
1 ms348 KiB
#include <bits/stdc++.h> #define endl "\n" #define yeap cout<<"YES"<<endl #define nope cout<<"NO"<<endl #define ll long long using namespace std; #include "molecules.h" std::vector<int> find_subset(int l, int u, std::vector<int> w) { ll q = -1; ll sum = 0; vector<int> ans; for(int i=0; i<w.size(); i++){ sum = sum+w[i]; ans.push_back(w[i]); if(sum>=l && sum<=u){ q = 1; break; } } if(q==-1){ return std::vector<int>(0); } else { return ans; } }

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

molecules.cpp: In function 'std::vector<int> find_subset(int, int, std::vector<int>)':
molecules.cpp:16:19: warning: comparison of integer expressions of different signedness: 'int' and 'std::vector<int>::size_type' {aka 'long unsigned int'} [-Wsign-compare]
   16 |     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...