제출 #940473

#제출 시각아이디문제언어결과실행 시간메모리
940473ezzzayDetecting Molecules (IOI16_molecules)C++14
컴파일 에러
0 ms0 KiB
#include "molecules.h" #include<bits/stdc++.h> using namespace std; const int N=2e5+5; #define pb push_back #define ff first #define ss second std::vector<int> find_subset(int l, int u, std::vector<int> w) { int n=w.size(); vector<int>ans; for(int i=0;i<(1<<n);i++){ vector<int>vc; int s=0; for(int j=0;J<n;j++){ if(i & (1<<j)){ vc.pb(j+1); s+=w[j]; } } if(l<=s and s<=u){ ans=vc; break; } } return ans; }

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

molecules.cpp: In function 'std::vector<int> find_subset(int, int, std::vector<int>)':
molecules.cpp:14:15: error: 'J' was not declared in this scope
   14 |   for(int j=0;J<n;j++){
      |               ^