제출 #132831

#제출 시각아이디문제언어결과실행 시간메모리
132831redaDetecting Molecules (IOI16_molecules)C++14
컴파일 에러
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.size()>1){ if(w[0]*2>=l && w[0]*2<=u) { ans.push_back(w[i]); ans.push_back(w[i]); } } return ans; }

컴파일 시 표준 에러 (stderr) 메시지

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]);
                         ^