Submission #488745

#TimeUsernameProblemLanguageResultExecution timeMemory
488745ala2Detecting 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) { int n=w.size(); int bb=1; vector<int>g; for(int i=0;i<n;i++) { int h=(i+1)*w[i]; if(h>=l&&h<=u) { for(int j=1;j<=i+1;j++) { g.push_back(j); } break; } } return g; } //15 25 //4 10 10 10 11

Compilation message (stderr)

molecules.cpp: In function 'std::vector<int> find_subset(int, int, std::vector<int>)':
molecules.cpp:8:9: warning: unused variable 'bb' [-Wunused-variable]
    8 |     int bb=1;
      |         ^~
#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...