답안 #132830

# 제출 시각 아이디 문제 언어 결과 실행 시간 메모리
132830 2019-07-19T17:29:05 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[i]*2>=l && w[i]*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:6:10: error: 'i' was not declared in this scope
     if(w[i]*2>=l && w[i]*2<=u)
          ^