Submission #672650

#TimeUsernameProblemLanguageResultExecution timeMemory
672650mseebacherDetecting Molecules (IOI16_molecules)C++17
Compilation error
0 ms0 KiB
#include <bits/stdc++.h> #include "molecules.h" using namespace std; vector<int> find_subset(int l, int u, vector<int> w) { int n = w.size(); vector<int> erg; ll sum = 0; for(int i = 0;i<n;i++){ if(sum >= l && sum <= u){ return erg; } sum += w[i]; erg.push_back(i); } return erg; }

Compilation message (stderr)

molecules.cpp: In function 'std::vector<int> find_subset(int, int, std::vector<int>)':
molecules.cpp:8:2: error: 'll' was not declared in this scope; did you mean 'l'?
    8 |  ll sum = 0;
      |  ^~
      |  l
molecules.cpp:10:6: error: 'sum' was not declared in this scope
   10 |   if(sum >= l && sum <= u){
      |      ^~~
molecules.cpp:13:3: error: 'sum' was not declared in this scope
   13 |   sum += w[i];
      |   ^~~