Submission #488749

#TimeUsernameProblemLanguageResultExecution timeMemory
488749ala2Detecting Molecules (IOI16_molecules)C++14
9 / 100
0 ms292 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=0;j<=i;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...