Submission #942572

#TimeUsernameProblemLanguageResultExecution timeMemory
942572attkyDetecting Molecules (IOI16_molecules)C++17
0 / 100
0 ms348 KiB
#include <bits/stdc++.h> using namespace std; vector<int> find_subset(int l, int u, vector<int> w) { sort(w.begin(), w.end()); vector<int> tab; for(int loop = 1; loop <= tab.size(); ++loop) { if(l <= w[0]*loop && w[0]*loop <= u) { for(int looping = 0; looping < loop; ++looping) { tab.push_back(w[0]); } return tab; } } return tab; }

Compilation message (stderr)

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