제출 #1102135

#제출 시각아이디문제언어결과실행 시간메모리
1102135akzytrDetecting Molecules (IOI16_molecules)C++17
9 / 100
1 ms440 KiB
#include "molecules.h" #include <bits/stdc++.h> typedef long long ll; using namespace std; vector<int> find_subset(int l, int u, vector<int> w) { vector<int> result; int sum = 0; for(int i = 0; i < w.size(); i++) { sum += w[i]; if(sum >= l && sum <= u) { for(int j =0; j <= i; j++){ result.push_back(j); } break; } } return result; }

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

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