제출 #777481

#제출 시각아이디문제언어결과실행 시간메모리
777481JoenPoenManDetecting Molecules (IOI16_molecules)C++17
0 / 100
2 ms596 KiB
#include "molecules.h" #include <bits/stdc++.h> using namespace std; typedef pair<int, vector<int>> iv; vector<iv> dp; std::vector<int> find_subset(int l, int u, std::vector<int> w) { dp.push_back({0, {}}); for (int i = 0; i < w.size(); i++) { for (iv eel : dp) { int we; vector<int> contents; tie(we, contents) = eel; if (we+w[i] <= u) { contents.push_back(i); if (we+w[i] >= l) return contents; dp.push_back({we+w[i], contents}); } } } return std::vector<int>(0); }

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

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