답안 #132831

# 제출 시각 아이디 문제 언어 결과 실행 시간 메모리
132831 2019-07-19T17:29:45 Z reda Detecting Molecules (IOI16_molecules) C++14
컴파일 오류
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]);
                         ^