Submission #443839

#TimeUsernameProblemLanguageResultExecution timeMemory
443839fuad27Detecting Molecules (IOI16_molecules)C++14
0 / 100
0 ms204 KiB
#include "molecules.h" #include<bits/stdc++.h> using namespace std; vector<int> find_subset(int l, int u, vector<int> w) { vector<int> v; long long sum = 0; for(int i = 0;i<w.size();i++) { sum += w[i]; v.push_back(i+1); if(sum > u)return {}; if(sum >= l and sum<=u)return v; } return {}; }

Compilation message (stderr)

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