Submission #425884

#TimeUsernameProblemLanguageResultExecution timeMemory
425884vincentpikachu20Detecting Molecules (IOI16_molecules)C++17
0 / 100
1 ms204 KiB
#include "molecules.h" #include <bits/stdc++.h> using namespace std; vector<int> find_subset(int l, int u, vector<int> w) { sort(w.begin(), w.end()); u = min(u,accumulate(w.begin(), w.end(), 0)); int n = w.size(); // int k = (l+w[0]-1)/w[0]; if(k*w[0] > u) return vector<int>(); else return vector<int>(k,w[0]); }

Compilation message (stderr)

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