Submission #942574

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

Compilation message (stderr)

molecules.cpp: In function 'std::vector<long long int> find_subset(int, int, std::vector<long long int>)':
molecules.cpp:8:35: warning: comparison of integer expressions of different signedness: 'long long int' and 'std::vector<long long int>::size_type' {aka 'long unsigned int'} [-Wsign-compare]
    8 |  for(long long int loop = 1; loop <= w.size(); ++loop) {
      |                              ~~~~~^~~~~~~~~~~
/usr/bin/ld: /tmp/ccsES7UN.o: in function `main':
grader.cpp:(.text.startup+0x18d): undefined reference to `find_subset(int, int, std::vector<int, std::allocator<int> >)'
collect2: error: ld returned 1 exit status