Submission #621426

#TimeUsernameProblemLanguageResultExecution timeMemory
621426kkkkkkkkDetecting Molecules (IOI16_molecules)C++17
0 / 100
1 ms212 KiB
#include <bits/stdc++.h> using namespace std; vector<int> find_subset(int l,int u,vector<int> w) { vector<int> rez; int p=l/w[0]; if (p*w[0]==l&&p<=w.size()) for (int i=0;i<p;i++) rez.push_back(w[0]); else if ((p+1)*w[0]>=l&&(p+1)*w[0]<=u&&p<=w.size()) for (int i=0;i<=p;i++) rez.push_back(w[0]); return rez; }

Compilation message (stderr)

molecules.cpp: In function 'std::vector<int> find_subset(int, int, std::vector<int>)':
molecules.cpp:10:21: warning: comparison of integer expressions of different signedness: 'int' and 'std::vector<int>::size_type' {aka 'long unsigned int'} [-Wsign-compare]
   10 |     if (p*w[0]==l&&p<=w.size())
      |                    ~^~~~~~~~~~
molecules.cpp:13:45: warning: comparison of integer expressions of different signedness: 'int' and 'std::vector<int>::size_type' {aka 'long unsigned int'} [-Wsign-compare]
   13 |     else if ((p+1)*w[0]>=l&&(p+1)*w[0]<=u&&p<=w.size())
      |                                            ~^~~~~~~~~~
#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...