Submission #132831

# Submission time Handle Problem Language Result Execution time Memory
132831 2019-07-19T17:29:45 Z reda Detecting Molecules (IOI16_molecules) C++14
Compilation error
0 ms 0 KB
#include<bits/stdc++.h>
using namespace std ;
 vector<int>find_subset(int l, int u, vector<int> w)
{
    vector<int> ans;
   if(w.size()>1){
    if(w[0]*2>=l && w[0]*2<=u)
    {
        ans.push_back(w[i]);
        ans.push_back(w[i]);
    }
   }
return ans;
}

Compilation message

molecules.cpp: In function 'std::vector<int> find_subset(int, int, std::vector<int>)':
molecules.cpp:9:25: error: 'i' was not declared in this scope
         ans.push_back(w[i]);
                         ^