Submission #942573

#TimeUsernameProblemLanguageResultExecution timeMemory
942573attkyDetecting 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 <= w.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 <= w.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...