Submission #132830

#TimeUsernameProblemLanguageResultExecution timeMemory
132830redaDetecting Molecules (IOI16_molecules)C++14
Compilation error
0 ms0 KiB
#include<bits/stdc++.h> using namespace std ; vector<int>find_subset(int l, int u, vector<int> w) { vector<int> ans; if(w[i]*2>=l && w[i]*2<=u) { ans.push_back(w[i]); ans.push_back(w[i]); } return ans; }

Compilation message (stderr)

molecules.cpp: In function 'std::vector<int> find_subset(int, int, std::vector<int>)':
molecules.cpp:6:10: error: 'i' was not declared in this scope
     if(w[i]*2>=l && w[i]*2<=u)
          ^