Submission #282098

#TimeUsernameProblemLanguageResultExecution timeMemory
282098Pichon5Detecting Molecules (IOI16_molecules)C++17
0 / 100
1 ms384 KiB
#include "molecules.h" #include <bits/stdc++.h> #define vi vector<int> using namespace std; std::vector<int> find_subset(int l, int u, std::vector<int> w){ for(int i=0;i<(1<<w.size());i++){ vi vv; for(int j=0;j<w.size();j++){ if(i&(1<<j)){ vv.push_back(w[j]); } } int sum=0; for(int ll=0;ll<vv.size();ll++){ sum+=vv[ll]; } if(sum>=l && sum<=u){ return vv; } } vi v; return v; }

Compilation message (stderr)

molecules.cpp: In function 'std::vector<int> find_subset(int, int, std::vector<int>)':
molecules.cpp:8:22: warning: comparison of integer expressions of different signedness: 'int' and 'std::vector<int>::size_type' {aka 'long unsigned int'} [-Wsign-compare]
    8 |         for(int j=0;j<w.size();j++){
      |                     ~^~~~~~~~~
molecules.cpp:14:24: warning: comparison of integer expressions of different signedness: 'int' and 'std::vector<int>::size_type' {aka 'long unsigned int'} [-Wsign-compare]
   14 |         for(int ll=0;ll<vv.size();ll++){
      |                      ~~^~~~~~~~~~
#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...